Add major model providers (Western + all major Chinese) - #70
Merged
Conversation
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.
Multi-provider support
ClawForge is no longer effectively OpenRouter-only. Adds a generic OpenAI-compatible client, a native Anthropic client, and a catalog covering 24 providers wired up from environment variables.
Runtime (
backend/planner/src/providers/)openai_compatible.rs— generic/chat/completionsclient (covers OpenAI, Gemini, Mistral, xAI, Groq, Together, Fireworks, Perplexity, Cohere, and every catalog Chinese provider).anthropic.rs— native Anthropic Messages API client.catalog.rs—ProviderInfocatalog +register_from_env, withRegion/Wiremetadata and aneeds_residency_review()helper.Providers covered
Global/Western: OpenRouter, OpenAI, Anthropic, Google Gemini, Mistral, xAI Grok, Groq, Together, Fireworks, Perplexity, Cohere, Ollama (local).
Chinese: DeepSeek, Alibaba Qwen (DashScope), Zhipu GLM, Moonshot/Kimi, Baidu ERNIE, MiniMax, Tencent Hunyuan, 01.AI Yi, StepFun, Baichuan, iFlytek Spark, SenseTime SenseNova.
Wiring & docs
cli serveregisters every provider whose API key is set in the env..env.examplelists all provider keys; newdocs/model-providers.mddocuments them, including data-residency notes for government use.Build fixes (pre-existing, unblock the runtime build)
executor: importCapabilities(the CLI/runtime did not compile on main without this).cli: enable thetower-httplimitfeature used byRequestBodyLimitLayer.Verification
cargo test -p clawforge-planner— passing (incl. catalog tests; unique ids, Chinese coverage, env registration).cargo build -p clawforge-cli— now builds.