Skip to content

docs(api): OpenAI server supports tool-calling#620

Open
jeswr wants to merge 1 commit into
JustVugg:devfrom
jeswr:docs-api-tools
Open

docs(api): OpenAI server supports tool-calling#620
jeswr wants to merge 1 commit into
JustVugg:devfrom
jeswr:docs-api-tools

Conversation

@jeswr

@jeswr jeswr commented Jul 25, 2026

Copy link
Copy Markdown

docs/api.md (the OpenAI coli serve section) currently says Tools "return an explicit error rather than being silently ignored." That's stale for Tools: c/openai_server.py at HEAD ships full tool-calling — parse_tool_calls() (renders GLM tool markers back into OpenAI tool_calls), render_chat(..., tools, tool_choice) (injects the <tools> XML and honours tool_choice including none/required/forced-function), plus a dedicated test_openai_tools_e2e.py. Tool schemas only 400 when malformed (landed via #401/#408). The Anthropic section of the same doc already documents full tools support, so the OpenAI paragraph contradicted both the code and its sibling section.

This corrects only the Tools sentence; the image/audio input, custom stop sequences, log-probabilities, and token-penalty items are left unchanged.

Prepared for review — happy to adjust wording. (Heads-up: there may be a delay before I can respond to review comments.)

The OpenAI coli serve section said tools 'return an explicit error'; the
server ships full tool-calling (parse_tool_calls / render_chat tool_choice,
test_openai_tools_e2e.py, JustVugg#401/JustVugg#408). Correct the stale sentence; leave the
image/audio/stop/logprob/penalty items unchanged.
@JustVugg
JustVugg changed the base branch from main to dev July 26, 2026 00:43
@JustVugg

Copy link
Copy Markdown
Owner

Thanks — and this docs fix is correct: tool-calling is supported on the OpenAI /v1/chat/completions path (the previous wording was wrong). I retargeted it from main to dev (all contributions land on dev), which surfaced a conflict in docs/api.md since that file moved on dev. Could you rebase onto current dev and resolve it? Then it merges.

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.

2 participants