From 3cfe512ad2558ba9f774d7c39f2f1adc19789b46 Mon Sep 17 00:00:00 2001 From: Abhijay Jain Date: Mon, 24 Aug 2026 08:04:25 +0000 Subject: [PATCH] feat(providers): add TrustedRouter declarative provider (#11422) Signed-off-by: Abhijay Jain --- crates/goose-providers/src/declarative.rs | 1 + .../definitions/trustedrouter.json | 52 +++++++++++++++++++ .../docs/getting-started/providers.md | 1 + 3 files changed, 54 insertions(+) create mode 100644 crates/goose-providers/src/declarative/definitions/trustedrouter.json diff --git a/crates/goose-providers/src/declarative.rs b/crates/goose-providers/src/declarative.rs index dfd7935d9..40b770316 100644 --- a/crates/goose-providers/src/declarative.rs +++ b/crates/goose-providers/src/declarative.rs @@ -52,6 +52,7 @@ pub(crate) mod declarative_providers { tanzu, tensorix, together, + trustedrouter, venice, vercel_ai_gateway, zai, diff --git a/crates/goose-providers/src/declarative/definitions/trustedrouter.json b/crates/goose-providers/src/declarative/definitions/trustedrouter.json new file mode 100644 index 000000000..b47a463f7 --- /dev/null +++ b/crates/goose-providers/src/declarative/definitions/trustedrouter.json @@ -0,0 +1,52 @@ +{ + "name": "trustedrouter", + "engine": "openai", + "display_name": "TrustedRouter", + "description": "Models from OpenAI, Anthropic, Google, DeepSeek and others via TrustedRouter's OpenAI-compatible API, with per-request routing and failover.", + "api_key_env": "TRUSTEDROUTER_API_KEY", + "base_url": "https://api.trustedrouter.com/v1", + "dynamic_models": true, + "models": [ + { + "name": "trustedrouter/auto", + "context_limit": 200000 + }, + { + "name": "trustedrouter/fast", + "context_limit": 128000 + }, + { + "name": "trustedrouter/cheap", + "context_limit": 128000 + }, + { + "name": "trustedrouter/zdr", + "context_limit": 200000 + }, + { + "name": "trustedrouter/e2e", + "context_limit": 128000 + }, + { + "name": "anthropic/claude-opus-4-7", + "context_limit": 1000000 + }, + { + "name": "anthropic/claude-sonnet-4-6", + "context_limit": 1000000 + }, + { + "name": "openai/gpt-5.4-mini", + "context_limit": 400000 + } + ], + "preserves_thinking": true, + "supports_streaming": true, + "model_doc_link": "https://api.trustedrouter.com/v1/models", + "setup_steps": [ + "Sign in to https://trustedrouter.com", + "Open https://trustedrouter.com/keys", + "Create a new API key", + "Copy the key and paste it above" + ] +} diff --git a/documentation/docs/getting-started/providers.md b/documentation/docs/getting-started/providers.md index 40566b1f7..c8da56e3f 100644 --- a/documentation/docs/getting-started/providers.md +++ b/documentation/docs/getting-started/providers.md @@ -62,6 +62,7 @@ goose is compatible with a wide range of LLM providers, allowing you to choose a | [Snowflake](https://docs.snowflake.com/user-guide/snowflake-cortex/aisql#choosing-a-model) | Access the latest models using Snowflake Cortex services, including Claude models. **Requires a Snowflake account and programmatic access token (PAT)**. | `SNOWFLAKE_HOST`, `SNOWFLAKE_TOKEN` | | [VMware Tanzu Platform](https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/ai-services/10-3/ai/index.html) | Enterprise-managed LLM access through AI Services on VMware Tanzu Platform. Models are fetched dynamically from the endpoint. | `TANZU_AI_API_KEY`, `TANZU_AI_ENDPOINT` | | [Tetrate Agent Router Service](https://router.tetrate.ai) | Unified API gateway for AI models including Claude, Gemini, GPT, open-weight models, and others. Supports PKCE authentication flow for secure API key generation. | `TETRATE_API_KEY`, `TETRATE_HOST` (optional) | +| [TrustedRouter](https://trustedrouter.com) | Models from OpenAI, Anthropic, Google, DeepSeek and others via TrustedRouter's OpenAI-compatible API, with per-request routing and failover. | `TRUSTEDROUTER_API_KEY` | | [Venice AI](https://venice.ai/home) | Provides access to open source models like Llama, Mistral, and Qwen while prioritizing user privacy. **Requires an account and an [API key](https://docs.venice.ai/overview/guides/generating-api-key)**. | `VENICE_API_KEY`, `VENICE_HOST` (optional), `VENICE_BASE_PATH` (optional), `VENICE_MODELS_PATH` (optional) | | [Cerebras](https://cerebras.ai/) | Fast inference on Cerebras wafer-scale engines with models like Llama, Qwen, and others. | `CEREBRAS_API_KEY` | | [xAI](https://x.ai/) | Access to xAI's Grok models including grok-3, grok-3-mini, and grok-3-fast with 131,072 token context window. | `XAI_API_KEY`, `XAI_HOST` (optional) |