Skip to content

NVIDIA NIM kimik2.5 returns numeric tool call IDs causing 'expected id to be a string' error #19947

@JoshCLWren

Description

@JoshCLWren

Describe the bug

When using NVIDIA NIM kimik2.5 model with tool calls, the provider returns tool call IDs as numeric values instead of strings, causing Zod validation errors: expected id to be a string

To Reproduce

  1. Configure NVIDIA NIM kimik2.5 as provider
  2. Attempt a tool call (e.g., read, write, etc.)
  3. Observe validation error in logs

Expected behavior

Tool calls should work seamlessly with NVIDIA NIM kimik2.5, automatically converting numeric IDs to strings.

Root Cause

NVIDIA NIM kimik2.5 returns tool call IDs as numbers (e.g., 123) instead of strings (e.g., "123"), violating OpenAI API specification which requires string IDs.

Environment

  • Provider: NVIDIA NIM
  • Model: kimik2.5
  • OpenCode version: latest

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions