Repository navigation
Conversation
Mistral's chat completions endpoint rejects the OpenAI-only `store` field with 422 extra_forbidden, so every Mistral request through the openai-completions adapter failed. Treat Mistral as a non-standard provider in detectCompat (matched by provider id or api.mistral.ai base URL) so the adapter no longer emits `store`; explicit `compat.supportsStore` overrides still win. fixes vastsa#2539
|
Review: the end-to-end wire-body tests cover the reported rejection and protect OpenAI defaults; the focused compat logic also composes with the existing DeepSeek replay flags. This is the stronger of the two competing fixes (#2540/#2541); please coordinate with #2540 so only one implementation lands. I did not merge: this head is based on 7254a04 and is 15 commits behind/diverged from current |
|
Correction: my earlier comment incorrectly credited #2541 with committed wire-body tests. After checking the actual diff, those tests are in #2540; #2541 changes only the vendored pi-ai patch and lockfile. I recommend coordinating on #2540 and not merging both. #2541 still needs a current-main refresh before any landing decision. |
|
Superseded by merged PR #2562. |
Summary / 概要
Mistral's chat completions endpoint (api.mistral.ai) rejects the OpenAI-only
storefield with422 extra_forbidden, so every Mistral request through theopenai-completionsadapter failed (reported in #2539 with PI-Desktop 0.23.0).Fix: treat Mistral as a non-standard provider in
detectCompatinside the bundled@earendil-works/[email protected]patch — matched byprovider === "mistral"or anapi.mistral.aibase URL — so the adapter no longer emitsstore: falsefor Mistral. Explicitcompat.supportsStoreoverrides still take precedence, and no other provider's detection changes.Verified with a payload-level smoke test against the patched dist:
store: false(reproduces the 422)storefield; an OpenAI model still sendsstore: false(no regression)git apply --check) against the pristine@earendil-works/[email protected]npm tarballRequirement link / 需求关联
fixes #2539