Skip to content

fix(provider): strip Nvidia Kimi tool schemas#28997

Open
VIVAAN-DHAWAN wants to merge 1 commit into
anomalyco:devfrom
VIVAAN-DHAWAN:fix/nvidia-kimi-tool-schema
Open

fix(provider): strip Nvidia Kimi tool schemas#28997
VIVAAN-DHAWAN wants to merge 1 commit into
anomalyco:devfrom
VIVAAN-DHAWAN:fix/nvidia-kimi-tool-schema

Conversation

@VIVAAN-DHAWAN
Copy link
Copy Markdown

@VIVAAN-DHAWAN VIVAAN-DHAWAN commented May 23, 2026

Issue for this PR

Closes #26662

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Nvidia-hosted Kimi K2.6 rejects normal tool parameter schemas with an internal server error: unhashable type: dict.

This keeps the existing Moonshot/Kimi handling, and adds the same practical fallback for Nvidia Kimi: send a minimal object schema for tool parameters. That avoids the provider-side schema hashing crash while still allowing tools to be offered.

How did you verify your code works?

From packages/opencode:

  • bun test test/provider/transform.test.ts -t "Nvidia Kimi"
  • bun typecheck

From the repo root:

  • git diff --check

I also checked the related open PR #25492. That PR is about Moonshot schema depth, while this one is scoped to the Nvidia-hosted Kimi provider error.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label May 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found a potentially related PR:

#25492: fix(provider): limit JSON schema depth for Moonshot/Kimi
#25492

This PR appears to address a similar issue with Kimi/Moonshot models and JSON schema handling. While the current PR (28997) specifically targets Nvidia-hosted Kimi models with a schema stripping approach, PR #25492 may have tackled a related schema depth limitation for the same provider. You should verify whether #25492 is still open or merged, and if there's any overlap in scope or approach.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label May 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internal server error: unhashable type: 'dict' with Kimi K2.6 via Nvidia NIM

1 participant