GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — Devstral via LiteLLM OpenAI-compatible fails with invalid_request_message_order on first file edit · Issue #6346 · anomalyco/opencode Closed as not planned Closed as not planned Copy link DescriptionDescriptionWhen OpenCode is configured to use Devstral (devstral-2512) through the OpenAI-compatible provider path (LiteLLM OpenAI-compatible endpoint), the run fails as soon as the agent performs an edit operation (i.e., when it tries to edit a file and then continue). The failure occurs immediately at the point where OpenCode attempts to proceed after the edit. Error message: litellm.BadRequestError: MistralException - {"object":"error","message":"Expected last role User or Tool (or Assistant with prefix True) for serving but got assistant","type":"invalid_request_message_order","param":null,"code":"3230"}. Received Model Group=devstral-2512 Available Model Group Fallbacks=NoneThe same workflow does not fail when Devstral is used through the native Mistral provider path (mistral_v1). Our config: {
"$schema": "https://opencode.ai/config.json",
"tools": {
"bash": true,
"edit": true,
"write": true,
"read": true,
"grep": true,
"glob": true,
"list": true,
"lsp": true,
"patch": true,
"skill": true,
"todowrite": true,
"todoread": true,
"webfetch": true
},
"provider": {
"ascii-mistral": {
"npm": "@ai-sdk/mistral",
"name": "ASCII LiteLLM (Mistral native)",
"options": {
"baseURL": "https://llm.ascii.ac.at/mistral/v1",
"apiKey": "{env:ASCII_AGENTIC_CODING_KEY}"
},
"models": {
"devstral-2512": {
"name": "devstral-2512 (via LiteLLM)",
"limit": { "context": 256000, "output": 256000 },
"tool_call": true,
},
"codestral-2508": {
"name": "codestral-2508 (via LiteLLM)",
"limit": { "context": 128000, "output": 128000 },
"tool_call": true,
},
}
},
"ascii-oai-compatible": {
"npm": "@ai-sdk/openai-compatible",
"name": "ASCII LiteLLM",
"options": {
"baseURL": "https://llm.ascii.ac.at/v1",
"apiKey": "{env:ASCII_AGENTIC_CODING_KEY}"
},
"models": {
"devstral-2512": {
"name": "devstral-2512 (via LiteLLM)",
"limit": { "context": 256000, "output": 256000 },
"tool_call": true,
},
"codestral-2508": {
"name": "codestral-2508 (via LiteLLM)",
"limit": { "context": 128000, "output": 128000 },
"tool_call": true,
},
}
}
},
"model": "ascii-oai-compatible/devstral-2512"
}
Is this likely a opencode or litellm issue? OpenCode version1.0.207 Steps to reproduceNo response Screenshot and/or share linkNo response Operating SystemNo response TerminalNo response Reacted by Romain Valtier and Vincent Kelleher Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |