Skip to content

Add native tool calling support to Nano-GPT provider#5407

Merged
markijbema merged 1 commit intomainfrom
christiaan/nanogpt
Jan 27, 2026
Merged

Add native tool calling support to Nano-GPT provider#5407
markijbema merged 1 commit intomainfrom
christiaan/nanogpt

Conversation

@chrarnoldus
Copy link
Collaborator

vibe coded

@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2026

🦋 Changeset detected

Latest commit: 77cfa54

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Jan 26, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds native tool calling support to the Nano-GPT provider. The implementation follows the established patterns used by other providers in the codebase.

Key Changes:

  • Adds tools, tool_choice, and parallel_tool_calls parameters to the completion request when native tool protocol is used
  • Handles streaming tool_call_partial chunks for incremental tool call arguments
  • Emits tool_call_end events when finish_reason is "tool_calls"
  • Includes comprehensive test coverage for all new functionality

Code Quality:

  • ✅ Uses existing convertToolsForOpenAI method from BaseProvider for schema conversion
  • ✅ Properly tracks active tool call IDs to emit end events
  • ✅ Follows the same streaming pattern as other OpenAI-compatible providers
  • ✅ Test file includes thorough coverage of tool call scenarios
Files Reviewed (3 files)
  • .changeset/nano-gpt-native-tools.md - Changeset for the patch
  • src/api/providers/nano-gpt.ts - Native tool calling implementation
  • src/api/providers/__tests__/nano-gpt-native-tools.spec.ts - Test coverage

@lambertjosh
Copy link
Contributor

Nice if we can fix this. Note I have not tested it, if that is needed LMK.

@chrarnoldus
Copy link
Collaborator Author

We can just merge it, it's not going to get more broken than is already is.

@markijbema markijbema merged commit ac25eb1 into main Jan 27, 2026
12 checks passed
@markijbema markijbema deleted the christiaan/nanogpt branch January 27, 2026 10:00
@github-actions github-actions bot mentioned this pull request Jan 27, 2026
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.

3 participants