Repository navigation
Conversation
- Add an LLM Gateway entry beside OpenAI and Anthropic, using the existing OPENAI_BASE_URL and BOT_MODEL settings - Name the tools and JSON output a model needs, and the Anthropic settings for Claude models - Say why Settings → Setup reads Not checked for a gateway key
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.
Closes #89
The problem
The Quick start names two ways to run the OpenDuet Bot: OpenAI and Anthropic. LLM Gateway serves models from many providers behind one OpenAI-compatible key, and OpenDuet already reaches it through
OPENAI_BASE_URLandBOT_MODEL. Nothing says so, or which models will work.The approach
One entry under To use another provider or model, beside OpenAI and Anthropic:
OPENAI_BASE_URL=https://api.llmgateway.io/v1,OPENAI_API_KEY, andBOT_MODELwith an ID from the gateway's model list. Unset, the Bot keepsgpt-5.6-terrafrommodel.yaml./chat/completionswithresponse_format: json_object.BOT_PROVIDER=anthropic,ANTHROPIC_BASE_URL=https://api.llmgateway.io.normalizeModelBaseUrlsadds the/v1.checkModelAvailabilityasks only OpenAI and Anthropic about a key, and skips custom endpoints.What is not covered
No code change and no new provider id. Everything goes through settings OpenDuet already reads. A first-class provider row would belong in OpenBot.
Verification
bun run format:checkandbun run lintinopenbot/pass.bun test tests/copilot.test.ts tests/routing-model-url.test.ts tests/model-availability-check.test.ts tests/openduet-setup.test.tspasses: 144 tests, 0 failures.A throwaway script, not committed, runs OpenDuet's own code with the README's settings:
normalizeModelBaseUrls,runtimeModelForEnvironment, CopilotKit'sresolveModelwith a tool, and the router'screateModelCompleter. Against a local capture server, the requests were:BOT_MODELPOST /v1/responses,gpt-5.6-terra, 1 tool, stream, BearerPOST /v1/chat/completions,gpt-5.6-terra,json_objectBOT_MODEL=gemini-3.6-flashPOST /v1/responses,gemini-3.6-flash, 1 tool, stream, BearerPOST /v1/chat/completions,gemini-3.6-flash,json_objectBOT_MODEL=claude-sonnet-5-5POST /v1/messages,claude-sonnet-5-5, 1 tool, stream,x-api-keyPOST /v1/messages,claude-sonnet-5-5The same script against
https://api.llmgateway.iowith a placeholder key got the gateway's ownAPI key not foundanswer on all three endpoints, not a 404. So the URLs are the gateway's real routes.The public model list (
GET /v1/models) listsgpt-5.6-terra,gemini-3.6-flashandclaude-sonnet-5-5. The first two have tools and JSON output.claude-sonnet-5-5has tools butjson_output: false, which is why Claude goes through the Anthropic settings.Not run: a full OpenDuet session with a live LLM Gateway key. This change is README only, so there is no screenshot or video.