Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

docs(runtime): document Mistral store compatibility

Tioit-Wang5b47a85e570b
diff --git a/docs/spec/03-runtime/11-provider-model-system.md b/docs/spec/03-runtime/11-provider-model-system.md
index 0c47e037b..be887cba7 100644
--- a/docs/spec/03-runtime/11-provider-model-system.md
+++ b/docs/spec/03-runtime/11-provider-model-system.md
@@ -121,6 +121,12 @@ showing Name, Base URL, or API format on the named-service path. Chat turns
still use the selected pi-ai adapter (`chat_completions`, `responses`,
`anthropic_messages`, `google_generative_ai`, or `opencode_go`). Zhipu / Z.AI
Completions requests use `thinkingFormat: "zai"` and `zaiToolStream: true`.
+Mistral Chat Completions requests suppress pi-ai's OpenAI-only `store` field,
+which the endpoint rejects with HTTP 422 (`extra_forbidden`, #2539). Detection
+uses the configured Mistral host or named `vendorKey`; custom rows pointed at
+Mistral are covered, while unrelated custom endpoints and OpenAI keep their
+existing request bodies. DeepSeek-family compatibility remains layered on top
+for Mistral-hosted DeepSeek models.
DeepSeek-family Completions requests set
`requiresReasoningContentOnAssistantMessages: true` when the row's `vendorKey`,
base URL, model id, or catalog `family` identifies DeepSeek. pi-ai only
diff --git a/docs/spec/06-delivery/e2e/providers-and-models.md b/docs/spec/06-delivery/e2e/providers-and-models.md
index 5e381ba7e..96ca2245f 100644
--- a/docs/spec/06-delivery/e2e/providers-and-models.md
+++ b/docs/spec/06-delivery/e2e/providers-and-models.md
@@ -763,6 +763,25 @@ with only Host API controlled. Running-turn configuration remains queued.
retained-reasoning wire proof); live OpenCode / aggregator
verification deferred; rendered UI scenario pending
+## E2E-PROVIDER-mistral-store-compat: Omit OpenAI-only store on Mistral Chat Completions
+
+- **Preconditions**: Agent-runtime provider rows for native Mistral, Mistral-hosted
+ DeepSeek, a custom row pointing at Mistral, and OpenAI; local stub fetch only,
+ with no live credentials or provider requests.
+- **Steps**: Serialize one Chat Completions request for each row through the real
+ pi-ai adapter and capture its request body at the fetch boundary.
+- **Expected**: Mistral requests omit `store`, including the custom Mistral URL
+ and Mistral-hosted DeepSeek rows. DeepSeek reasoning replay compatibility stays
+ enabled. OpenAI keeps its existing `store: false` body.
+- **Coverage**: `provider-binding.test.ts` captures serialized adapter bodies;
+ `provider-presets.test.ts` checks endpoint and vendor matching, including
+ spoofed hosts and rows repointed to another published vendor. No real API is
+ called.
+- **Specs linked**: `03-runtime/11-provider-model-system.md`.
+- **Acceptance**: B (provider Chat Completions compatibility).
+- **Milestone**: Maintenance.
+- **Status**: Unit-covered; live Mistral verification is intentionally not run.
+
## E2E-006: Key survives restart
- **Preconditions**: Provider + key configured.