Skip to content

fix(runtime): suppress Mistral store field - #2562

Merged
Tioit-Wang merged 5 commits into
mainfrom
fix/p1-mistral-store
Nov 24, 2026
Merged

Tioit-Wang merged 5 commits into
mainfrom
fix/p1-mistral-store

Conversation

@Tioit-Wang

Copy link
Copy Markdown
Collaborator

Summary

Continues contributor PR #2540 without modifying the contributor fork. Suppresses the OpenAI-only store field for Mistral Chat Completions, including Mistral-hosted DeepSeek and custom Mistral endpoints, while preserving DeepSeek reasoning replay and OpenAI defaults. Preserves the original implementation commit and adds provider/E2E behavior documentation.

Validation

  • Shared provider preset tests: 31 passed
  • Agent runtime provider binding tests: 61 passed
  • Shared package tests: 742 passed
  • Shared/runtime builds and typechecks, lint, docs check, PR-base check, and git diff --check: passed
  • pnpm test:e2e: 21 checks passed, 2 live-provider checks skipped, then the unrelated session-revision scenario failed. The same failure was reproduced on clean main (including a Host binary built from this candidate); no paid/real provider was contacted.

Fixes #2539 after merge. Original commit from #2540 is preserved.

FFXFF1 and others added 4 commits November 24, 2026 23:00
Mistral's Chat Completions endpoint (`https://api.mistral.ai/v1/chat/completions`)
strictly rejects the OpenAI-only `store` field with HTTP 422 (`extra_forbidden`).
Because pi-ai's `openai-completions` auto-detection does not classify Mistral as a
non-standard endpoint, `supportsStore` defaulted to `true` and emitted `store: false`.

Add `isMistralEndpoint` and `mistralRequestCompat` in `@pi-desktop/shared` and wire
`supportsStore: false` in `buildProviderModel` for `openai-completions` bindings so
Mistral requests omit `store` while preserving DeepSeek replay compatibility and
OpenAI defaults.

fixes #2539
Record Mistral Chat Completions store suppression and its endpoint scope.
Document serialized request-body regression coverage for Mistral, hosted
DeepSeek, custom Mistral endpoints, and unchanged OpenAI behavior.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Deploying pi-desktop with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0bf7c8c
Status: ✅  Deploy successful!
Preview URL: https://59e64aac.pi-desktop.pages.dev
Branch Preview URL: https://fix-p1-mistral-store.pi-desktop.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mistral(api.mistral.ai)请求报 422:不允许 "store" 字段

2 participants