Repository navigation
feat: add Cheaper Inference as an open_code gateway provider - #165
Open
aiapienthusiast wants to merge 1 commit into
Open
aiapienthusiast wants to merge 1 commit into
aiapienthusiast wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Summary
open_codegateway provider, next to Infron.Closes Add Cheaper Inference as an open_code gateway provider #164.
Cheaper Inference is an OpenAI-compatible LLM gateway.
One API key gives access to models from several labs.
Its model ids are bare (one level), so a role ref is the provider prefix plus a bare id:
With only a
CHEAPERINFERENCE_API_KEYset (no Anthropic key, no other gateway key, noSWE_DEFAULT_RUNTIME), the main paths auto-selectopen_codeand default tocheaperinference/gpt-5.4-mini.A gateway key already configured keeps precedence.
Validation
make checkBehavior Impact
Notes
Every new path is gated on a Cheaper Inference key being the only gateway key present, so existing deployments do not change.
Details
Files:
opencode.json: acheaperinference(@ai-sdk/openai-compatible) provider with base URLhttps://api.cheaperinference.com/v1and the chat model ids it declares.swe_af/execution/schemas.pyandgo/internal/config/resolve.go:_cheaperinference_only_env/cheaperInferenceOnlyEnv, the auto default constant, and the auto-select wiring..env.example,README.md,agentfield-package.yaml,go/agentfield-package.yaml: document the key.docker-compose*.yml: passCHEAPERINFERENCE_API_KEYto the services.tests/test_model_config.py,go/internal/config/config_test.go,tests/test_dockerfile.py: cover auto-select, precedence, overrides, and the provider entry.Live check: the default model
gpt-5.4-minireturned a reply through thecheaperinferenceconfig's base URL, and every declared model id is a live text model fromGET /v1/models.