Repository navigation
feat(repl): add --endpoint and --provider for one session's connection - #195
Merged
Merged
Conversation
`fuseraft repl --endpoint <url> --provider <type>` points one session at a connection other than the config's, without changing ~/.fuseraft/config. - Either flag replaces both of the config's values, so the config's endpoint is never called as another provider. - Kept across /model and /resume; /provider replaces them; never saved, even with --save. - In --vscode mode, --model plus FUSERAFT_API_KEY is a complete setup with no config file, which is how fuseraft-web runs a chat per account.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
--endpointand--providertofuseraft repl, so one session can use a connection other than the one in~/.fuseraft/config. fuseraft-web needs this to run each account's chats with the model profile that account picked (fuseraft/fuseraft-web#5).Changes
--endpoint <url>and--provider <type>(openaifor any OpenAI-compatible API,anthropic,azure,ollama). They apply to this session only and are never saved, even with--save.--provider anthropic). With only--endpoint, the model ID's prefix picks the provider, or an OpenAI-compatible API is assumed./modeland/resume./providerreplaces them, since it sets up a new connection.--vscodemode needs no config file.--modelplusFUSERAFT_API_KEYis now a complete setup. Before, a home without a config refused to start with "fuseraft is not configured", so fuseraft-web had to write one into every new account's home.Testing
ReplFactoryConnectionTests: no flags keeps the config's connection; both flags replace it but keep the key; each flag alone drops the config's other value and resolves to the right default.--endpointset to the proxy: replied, and the proxy loggedPOST /v1/chat/completions.--endpointset to a dead port:Connection refused (127.0.0.1:9).--provider anthropicwith the proxy: the proxy loggedPOST /v1/messages, so the provider flag changes the API./model grok-4.3, requests still went to the proxy.--endpointworked and the config file was unchanged.FUSERAFT_HOMEin--vscodemode chatted with no config file created.Release
fuseraft-web passes these flags, and an older CLI rejects them as unknown options. Release this together with wire protocol v1, which fuseraft-web already requires.