-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Description
Description
When calling the Devstral-2-123B-Instruct-2512 model via the NVIDIA NIM OpenAI‑compatible endpoint (used from OpenCode), the JSON payload returned for a tool‑call does not contain an id field (or the field is null). OpenCode’s SDK validates the response and throws:
AI_InvalidResponseDataError: Expected "id" to be a string
Reproduction steps
- Set
NVIDIA_NIM_KEYto a valid key. - Run the curl command from the NVIDIA issue (see below).
- Observe the raw response – the
"id"property is missing.
Actual behaviour
Expected behaviour
Every response object should include an "id" string (e.g., "id": "msg_01abcd...").
Suggested fix
Add a mandatory "id" string to the response payload (or generate a UUID server‑side when the field is missing). If the field is optional, the SDK should fallback to a generated UUID instead of crashing.
Environment
- NVIDIA NIM endpoint: https://integrate.api.nvidia.com/v1/chat/completions
- Model: Devstral-2-123B-Instruct-2512
- Client: OpenCode 1.0.191
- Date: 2025‑12‑28
Metadata
Metadata
Assignees
Labels
No labels