Skip to content

Add id field to tool call responses API - #24882

Merged
ngxson merged 2 commits into
ggml-org:masterfrom
boondocklabs:master
Jun 22, 2026
Merged

ngxson merged 2 commits into
ggml-org:masterfrom
boondocklabs:master

Conversation

@boondocklabs

Copy link
Copy Markdown
Contributor

Overview

Add the missing id field to Responses API function_call output items.

The OpenAI Responses API function-calling examples include both an item id and a call_id on function_call output objects. Some clients, such as Rig 0.39, require the item-level id field when deserializing /v1/responses tool calls.

This change makes llama-server’s /v1/responses function-call output more compatible with the documented Responses API shape by emitting:

  • id: function-call output item id
  • call_id: tool call correlation id

Additional information

Tested locally with Qwen3-Coder-Next GGUF through llama-server /v1/responses. Before this change, Rig 0.39 failed with missing field id when parsing tool calls. After adding the item-level id, Rig successfully executed the tool call and returned the final answer.

Reference: OpenAI function calling guide:
https://developers.openai.com/api/docs/guides/function-calling#handling-function-calls

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES - ChatGPT was used to help diagnose the compatibility issue and draft this PR description. The code change was manually reviewed and tested.

@boondocklabs
boondocklabs requested a review from a team as a code owner June 21, 2026 21:30
@ngxson
ngxson merged commit dec5ca5 into ggml-org:master Jun 22, 2026
25 checks passed
adrianhoehne pushed a commit to adrianhoehne/llama.cpp that referenced this pull request Jul 5, 2026
zommiommy pushed a commit to zommiommy/llama.cpp that referenced this pull request Aug 18, 2026
zbrad pushed a commit to zbrad/llama.cpp that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants