published fresh until

llama.cpp: why does Codex additional_tools return 400?

Summary If Codex receives HTTP 400 from llama.cpp, check for an additional_tools input item before changing the model; the report attributes the error to request conversion. A reporter's local parser change is not a merged fix, and a later source snapshot still throws.

Not for server API migration, see llama-cpp-0-6-to-0-7-server-port-api-migration.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Check whether Codex sent an additional_tools input item before changing the model: llama.cpp's report attributes this HTTP 400 to request conversion, not generation (pbonato, #30859).

Do first: run codex features list and inspect the report's code_mode_host / unified_exec feature state; pbonato names this command in the reproduction (ggml-org/llama.cpp issue).

Diagnostic: Cannot determine type of 'item'

pbonato, October 20, reports “Cannot determine type of 'item'” with llama.cpp commit 2145525a4081d66ff1a87cf43ef809f95a85ac0c, Ubuntu 24.04 LTS, llama-server --jinja and Codex's wire_api = "responses".

Evidence: one user's end-to-end report plus the repository's converter code. No exact Codex build or universal affected-version range is established (report, pinned converter).

Not for: server API migration; see llama-cpp-0-6-to-0-7-server-port-api-migration.

Findings and local proposal

  • Request-shape check. The reporter's failing request includes an input item with type: "additional_tools", role developer and a tool namespace. The report says server-side feature selection can change this shape independently of a local CLI update. Treat that as the reporter's explanation, not an established claim about every Codex installation (pbonato).
  • What the converter does. The repository's server_chat_convert_responses_to_chatcmpl at 2871678a1db1c1756b7cbac456ccdc4f78ae2532 still throws in its fallback input-item branch. Its separate top-level tools conversion skips unsupported non-function tool types. That distinction explains why permissive handling of top-level tools does not establish support for this input item (ggml-org/llama.cpp source).
  • Reporter-only local change. pbonato reports replacing the fatal fallback with a warning and continuation, then completing a real Codex session on the named affected commit. The proposed verification is that the warning replaces the 400 and the conversation's tool calls and results continue. This is a locally reported parser modification, not a merged PR or proof that discarding every unknown item is correct (issue #30859).
  • Release status. The issue remains open (checked 2026-11-24). The cited later converter snapshot retains the throw; the November 2 b12038 pre-release notes concern a clang-cl/BF16 build change and do not announce support for additional_tools. These sources do not establish a released repair (source, release).

Limits

One end-to-end reporter on a named Linux source commit. Unknown input items can carry different semantics; the local skip proposal is not a general Responses API compatibility guarantee. Model quality, ordinary tool-definition errors and complete Codex integration support are outside this diagnosis.

Started from a post by @ggml-org/llama.cpp maintainers, packaged by the editor. Original post

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# llama.cpp: why does Codex additional_tools return 400?
Summary: If Codex receives HTTP 400 from llama.cpp, check for an additional_tools input item before changing the model; the report attributes the error to request conversion. A reporter's local parser change is not a merged fix, and a later source snapshot still throws.
Copy for agent
get the whatworks thread llama-cpp-codex-additional-tools-responses-400 and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread llama-cpp-codex-additional-tools-responses-400
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks