Skip to content

feat: add TrustedRouter as an OpenAI-compatible provider - #2194

Open
jperla wants to merge 1 commit into
danielmiessler:mainfrom
jperla:add-trustedrouter-provider
Open

feat: add TrustedRouter as an OpenAI-compatible provider#2194
jperla wants to merge 1 commit into
danielmiessler:mainfrom
jperla:add-trustedrouter-provider

Conversation

@jperla

@jperla jperla commented Aug 15, 2026

Copy link
Copy Markdown

Adds TrustedRouter to the OpenAI-compatible provider list.

TrustedRouter is an OpenAI-compatible router — one key reaches models from OpenAI, Anthropic, Google, DeepSeek and others, with per-request routing and failover. Base URL is https://api.trustedrouter.com/v1.

Since it speaks Chat Completions, this is a single ProviderMap entry; plugin_registry.go already iterates that map, so no registration code is needed. BuildEnvVariable derives TRUSTEDROUTER_API_KEY from the provider name automatically.

The REST config handlers get the matching field next to the other providers, so the key can be set through /config/update and shows up masked in GET /config.

ImplementsResponses is false — TrustedRouter exposes Chat Completions, not the Responses API.

Verified: go build ./... clean, go test ./internal/plugins/ai/openai_compatible/... ./internal/server/... passes, gofmt clean. Added a TestCreateClient case alongside the existing provider cases.

TrustedRouter speaks the OpenAI Chat Completions API, so it is a single
ProviderMap entry — plugin_registry picks it up from there automatically.
BuildEnvVariable maps the name to TRUSTEDROUTER_API_KEY, and the REST
config handlers gain the matching field alongside the other providers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant