Native Chat passthrough never learns or downgrades a refused reasoning effort (Mistral 400/422)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
Start by capturing Mistral’s raw 400 and 422 response bodies for the reported reasoning efforts, then check whether they match isReasoningEffortRejection in src/providers/reasoning-metadata.ts. Read src/server/chat-native.ts and src/adapters/openai-chat/passthrough.ts, comparing their flow with the Responses dispatch files. Done means a qualifying refusal triggers one lower-rung replay and records the refused rung so later turns and exports omit it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Area
Provider adapters
What are you trying to accomplish?
When a routed provider refuses a reasoning_effort rung on a native Chat Completions request (OpenCode, Kilo, any /v1/chat/completions caller), I want OpenCodex to learn that refusal and replay once at the next lower published rung, as it already does for Responses traffic. Reported in #8254: Mistral answers medium/xhigh with HTTP 400 and ultra with 422 for GLM 5.3, GLM 5.3 Flash and DeepSeek V4.1 Flash 1017.
What prevents this today?
planReasoningEffortDowngrade (src/providers/reasoning-metadata.ts) is only called from src/server/responses/adapter-dispatch.ts and src/server/responses/passthrough-dispatch.ts. The native Chat lane (src/server/chat-native.ts → src/adapters/openai-chat/passthrough.ts) has no downgrade replay and never calls recordUnsupportedReasoningEffort, so a refused rung fails every time and is never learned.
Second unknown: isReasoningEffortRejection needs the upstream body to blame the effort parameter. The reporter only saw the hub's sanitized client body ({"error":{"message":"The provider rejected the request.","type":"invalid_request_error","param":null,...}}), so nobody has confirmed what Mistral's raw 400/422 body says or whether it names reasoning_effort. Without that capture, wiring the replay might never trigger for Mistral.
What should OpenCodex do?
- Capture Mistral's raw 400 (
mediumonzai-glm-5-3) and 422 (ultra) bodies and check them againstisReasoningEffortRejection. - If they qualify, add the same single-rung downgrade replay and refusal recording to the native Chat lane, so a learned refusal also drops the rung from
configuredReasoningEffortsfor later turns and exports.
Example usage or interface
No new configuration. opencode run -m 'opencodex/mistral/deepseek-v4-1-flash-1017#medium' 'Reply with OK' would succeed on the replayed low rung and record medium as unsupported.
Alternatives or workarounds
The #8254 fix ships per-model Mistral ladders and folds native Chat ultra to max, which covers the known Mistral rows. The replay would cover rows whose accepted set changes later or is undocumented (DeepSeek V4.1 Flash 1017's ladder is empirical). Operators can also pin modelReasoningEfforts.
Additional context
Found while fixing #8254 on dev at ebeb1dc8ad. Related: #7590, #8251.
Checks
- I searched existing issues and documentation.
- This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
- I removed secrets and personal data.
- Lingua principale
- TypeScript
- Stelle
- 16.9k
- Fork
- 1.3k
- Merge medio
- 1g 4h
- PR unite (30g)
- 814
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lidge-jun/opencodex
-
bug gui platform
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
lidge-jun/opencodex#9172 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature]: Include provider, model and account label in the `upstream failure` service.log lineForse già presa @EnesKartal l’ha presa 4 giorni fa. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
lidge-jun/opencodex#9057 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offersForse già presa @sedoll l’ha presa 6 giorni fa. Apertacatalog provider provider-compatibility
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
lidge-jun/opencodex#9037 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug cli
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
lidge-jun/opencodex#9171 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
account-pool enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di lidge-jun/opencodex
Issue simili
-
manually bump balena-preload to ^19.0.6Forse già presa @shaunmulligan l’ha presa oggi. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 66/100
balena-io/balena-cli#3200 ·
I maintainer di solito rispondono entro 1 giorno
-
`MaterializedChatMessage._text` is quadratic in the number of text chunks (`+=` followed by `endsWith`), driving the extension host to heap OOMForse già presa @olegius88 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
microsoft/vscode-prompt-tsx#205 ·
-
triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 64/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
melgarafael/DeskcommCRM#5340 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
ehmpathy/rhachet-roles-ehmpathy#1529 ·
I maintainer di solito rispondono entro 1 giorno