Repository navigation
feat(model_registry): add Mistral provider — cloud-inference now feature-complete in Rust - #1573
Merged
Merged
Conversation
… the last cloud-inference gap Survey while picking off task #229 revealed the framing was wrong: the Rust `OpenAICompatibleAdapter::from_registry()` already supports 7 of the 8 cloud providers I'd planned to port (OpenAI, DeepSeek, Together, Groq, Fireworks, XAI, Google). The TS adapters under `src/daemons/ai-provider-daemon/adapters/{openai,deepseek,together, groq,fireworks,xai,google}/` are DUPLICATES of working Rust code — not a porting gap. The one real missing cloud provider in the Rust catalog was Mistral. This commit adds it end-to-end: - `Arch::Mistral` variant — Mistral's own dense + MoE line is architecturally distinct from Llama (MoE routing, tokenizer). ts-rs regenerates the protocol export so TS-side type checks stay in sync. - `provider(ProviderSpec { id: "mistral", ... })` in `providers()`. Bearer auth via `MISTRAL_API_KEY`, OpenAI-compat endpoint at `https://api.mistral.ai`, default `mistral-large-latest`, prefix-routing for mistral/mixtral/codestral/open-mistral/open-mixtral. - Two flagship model entries: `mistral-large-latest` (131k ctx, tool-use, $0.002/k in / $0.006/k out) and `codestral-latest` (32k ctx, ~60 tok/s for code). - `OpenAICompatibleAdapter::from_registry("mistral")` wired into `AIProviderModule::initialize` alongside the other 7 cloud providers — same registration pattern, gated on `MISTRAL_API_KEY`. After this commit a pure Rust deployment can call OpenAI, Anthropic, DeepSeek, Together, Groq, Fireworks, XAI, Google, AND Mistral for chat completions without going through the TS bridge. The substrate's headless-Rust inference surface is feature-complete for cloud providers. ## Verified cargo check -p continuum-core --lib --features metal,accelerate -> clean cargo test -p continuum-core --lib --features metal,accelerate model_registry:: -> 16/16 ## Follow-up task #229 reframed The remaining work is NOT "port 7 more adapters." It's: 1. Verify the TS adapter dirs (openai/deepseek/together/groq/ fireworks/xai/google/mistral) are no longer reachable by any active code path now that all 9 cloud providers route through Rust. 2. Delete the dead TS surface — including `AIProviderDaemonServer.ts`, the TS `AdapterProviderRegistry`, and the per-provider TS adapter dirs — once the verification proves nothing depends on them. That's a deletion PR, not a porting PR. Captured in the updated #229 description. ## Doctrinal alignment - `[[rust-is-the-core-node-is-the-shell]]` — cloud inference for every provider in the catalog now lives in Rust. Node calls `Commands.execute('ai/generate', ...)` and the typed Rust adapter handles it. - `[[inference-is-an-adapter-always-in-the-loop]]` — Mistral joins the same `AIProviderAdapter` trait pool as every other adapter (Anthropic, OpenAI-compat, Heuristic, AircRemote). Co-Authored-By: Claude Opus 4.7 <[email protected]>
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.
Adds the one missing cloud provider in the Rust model_registry catalog. After merge, all 9 cloud providers (Anthropic, OpenAI, DeepSeek, Together, Groq, Fireworks, XAI, Google, Mistral) plus 2 local providers (DMR, llamacpp-local) run through the Rust adapter pool — TS adapter dirs are duplicates and can be deleted in a follow-up.
Reframes task #229: the work is verify-and-delete, not port-7-adapters.
See commit for full body.
Co-Authored-By: Claude Opus 4.7 [email protected]