Skip to content

feat(model_registry): add Mistral provider — cloud-inference now feature-complete in Rust - #1573

Merged
joelteply merged 1 commit into
canaryfrom
refactor/cloud-inference-adapters-rust
Jun 9, 2026
Merged

joelteply merged 1 commit into
canaryfrom
refactor/cloud-inference-adapters-rust

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

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]

… 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]>
@joelteply
joelteply merged commit 1d445ef into canary Jun 9, 2026
2 checks passed
@joelteply
joelteply deleted the refactor/cloud-inference-adapters-rust branch June 9, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant