(feat): add routstr as a declarative provider - #9175
Conversation
Signed-off-by: 9qeklajc <9qeklajc>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b431c3c783
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ], | ||
| "dynamic_models": true, | ||
| "models": [ | ||
| "claude-opus-4.7", |
There was a problem hiding this comment.
Fix Routstr models so the provider loads
DeclarativeProviderConfig.models deserializes as Vec<ModelInfo>, so each entry must be an object with fields such as name and context_limit; these bare strings make serde_json::from_str fail. Since load_fixed_providers skips invalid fixed provider JSON, Routstr will not be registered or shown, and the added deserialize test will panic before its assertions. Encode the static models as ModelInfo objects, or remove the static defaults and align the test/docs with that choice.
Useful? React with 👍 / 👎.
|
The format of using strings alone for the models isn't valid This will need to be resolved before the PR can progress |
|
@apetersson fixed |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3279d0a689
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ], | ||
| "dynamic_models": true, | ||
| "models": [ | ||
| { "name": "claude-opus-4.7", "context_limit": 1000000 }, |
There was a problem hiding this comment.
Preserve Routstr model namespaces
When dynamic model fetching is unavailable or a user accepts the provider's default model, register_with_name uses these static models entries directly as the model IDs sent to the API. The Routstr docs added in this same commit show namespaced IDs such as anthropic/claude-opus-4.7 and deepseek/deepseek-v4-pro, but the static defaults drop those namespaces, so goose can send claude-opus-4.7 to Routstr and fail to route the model as documented. Keep the provider prefixes in the shipped model IDs so the fallback/default path matches Routstr's IDs.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df1b988f41
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "display_name": "Routstr", | ||
| "description": "OpenAI-compatible aggregator that fronts dozens of upstream providers (OpenAI, Anthropic, Google, DeepSeek, Llama, …) behind a single API. Authenticate with an sk-... bearer issued by a Routstr instance — payment (e.g. Cashu top-up) is handled outside goose.", | ||
| "api_key_env": "ROUTSTR_API_KEY", | ||
| "base_url": "${ROUTSTR_HOST}/v1", |
There was a problem hiding this comment.
Disable Responses routing for Routstr
When Routstr's dynamic /v1/models list includes OpenAI o*/gpt-5* IDs, this base URL derives the default OpenAI v1/chat/completions path, and OpenAiProvider::should_use_responses_api routes those model names to /v1/responses instead. Routstr is being documented here as a chat-completions OpenAI-compatible router, so users who pick one of those dynamically fetched models will send requests to an endpoint the Routstr integration does not configure or document. Add a provider-level way to force chat completions for Routstr before enabling dynamic models for OpenAI-family IDs.
Useful? React with 👍 / 👎.
* main: (66 commits) Switch GH pages deploy to actions/artifact workflow (#9025) fix(summon): re-apply canonical limits when delegate overrides model (#9183) Split code signing from build (#8587) refactor(logging): consolidate logging setup into shared helper in goose crate (#8817) fix(cli): report cumulative total_tokens in stream-json/json output (#8910) plugins: add open plugins (just skills for now) (#9063) fix(providers): refresh GCP metadata server token on expiration (#8929) chore(deps): bump the cargo-minor-and-patch group across 1 directory with 14 updates (#9178) chore(deps): bump bzip2 from 0.5.2 to 0.6.1 (#8964) chore(deps): bump tauri from 2.10.3 to 2.11.1 in /ui/goose2/src-tauri (#9066) chore(deps): bump hono from 4.12.14 to 4.12.18 in /evals/open-model-gym/mcp-harness (#9073) localize hardcoded strings in provider settings UI (#8931) chore(deps): bump @babel/plugin-transform-modules-systemjs from 7.28.5 to 7.29.4 in /documentation (#9122) move settings into app shell (#9047) Add Location column to CLI skills table (#8785) (feat): add routstr as a declarative provider (#9175) Add FuturMix provider (#8840) fix: convert quoted numeric config values to numbers if needed (#8844) fix(ui): keep SSE reconnect loop alive on long disconnects (#8717) (#8846) fix(openai): apply request_params to outgoing API payload (#9151) ...
Signed-off-by: 9qeklajc <9qeklajc> Co-authored-by: 9qeklajc <9qeklajc>
Summary
Add routstr a declarative provider for goose.
routstr is an opensource decentralized protocol and OpenAI-compatible API that provides access to models from Anthropic, Google, OpenAI, and DeepSeek.
Changes
crates/goose/src/providers/declarative/roustr.json— Declarative provider config following the existing pattern (groq.json, novita.json).documentation/docs/getting-started/providers.md— Added routstr to the provider tableConfiguration
Related Issues
Relates to #3113
Discussion: #3113