Repository navigation
feat(providers): add Cheaper Inference API provider - #2172
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.
Problem
ORG2 has no built-in entry for Cheaper Inference.
Cheaper Inference is an OpenAI-compatible LLM gateway.
One API key gives access to models from several labs.
Today a user must use the generic Custom provider and type the base URL and protocol by hand.
Solution
Add
cheaperinference_apias an API key provider.It uses the same pattern as #503 (Atlas Cloud) and the current CherryIN registry shape.
ModelType::CheaperinferenceApi, registry entry, endpoint table, protocols (openaidefault,anthropicoptional), env varCHEAPERINFERENCE_API_KEY.provider_id::CHEAPERINFERENCE,ProviderSpec, model type mapping, auxiliary model fallback list.Endpoints
https://api.cheaperinference.com/v1https://api.cheaperinference.com(/v1/messages)Potential risks
CherryinApiarm, so match exhaustiveness is the same as for CherryIN.custom). A brand SVG can follow in a separate change.Verification
rustfmt --edition 2021 --checkon all 11 changed Rust files: pass.CherryinApi/cherryin_api/provider_id::CHERRYINuse and added the new provider next to each one..tsfiles stay under 700 lines (largest: 598).cargo testforkey_vaultandagent_core,pnpm typecheck,pnpm lint:fast, app build. Reviewers or CI should run them.api_providers_are_api_key_providers,as_str_round_trips_through_from_str,new_aggregators_are_openai_and_anthropic_capable,every_key_vault_model_type_maps_to_a_registered_provider_spec.Submit checklist
.github/PR_RULES.md.feat(scope): summaryorfix(scope): summary.