responses: no portable tool surface for strict upstreams — meta rejects type: custom and requires every property in required
Is it a request payload issue? [x] Yes, this is a request payload issue. I am using a client/cURL to send a request payload, but I received an unexpected error. [ ] No, it's another issue.
If it's a request payload issue, you MUST know
The rejection comes from the upstream, not from the proxy. Capture the proxy's outbound body with request-log: true in config.yaml and compare it with what the client sent — the difference is the adaptation under discussion. meta is the reproducible case: it rejects type: "custom" and requires every property to appear in required.
Describe the bug
Summary
Some upstreams accept the Responses tool surface only in a reduced form. meta is the concrete case: it rejects type: "custom" and validates schemas in strict mode, so a property that is not listed in required is a validation error. Without an explicit portability layer, a client that declares a custom tool or an optional-parameter tool_search simply cannot be served by those upstreams at all.
Observed behavior
metarejects a request whose tool array containstype: "custom"— the whole request fails, not just the one tool.metarejects atool_searchparameter schema with optional properties, because strict validation requires every declared property to be inrequired.- A schema that uses local
$ref/$defsreferences is rejected or silently loses the referenced constraint.
Root cause chain
- Client tool declarations are forwarded with their declared shape, so any upstream that validates more strictly than the client rejects them.
- There is no defined place to express "this route needs a portable tool surface", so an operator cannot fix this without disabling the tools entirely.
- Local schema references are preserved verbatim, and a reference the upstream cannot resolve takes the whole tool down with it.
CLI Type
meta today, as observed by the PR author against that upstream; the exact rejection text is not attached here, so treat the mechanism as report rather than reproduced sample. The mechanism is route-scoped rather than provider-scoped, so any future strict upstream can opt in through configuration.
Model Name Any model reachable through a strict route.
LLM Client
Codex-style clients declaring custom tools or optional-parameter tool_search.
Request Information
A minimal strict-upstream rejection:
{ "model": "gpt-5.6",
"tools": [
{ "type": "tool_search", "execution": "client",
"parameters": { "type": "object", "properties": { "queries": { "type": "array", "items": { "type": "string" } }, "limit": { "type": "integer" } } } }
] }limit is optional, so it is absent from required — a strict validator rejects this. The custom case is the same shape of failure with a different trigger.
Expected behavior
- For a route that needs a portable surface, client-executed
tool_searchschemas are completed so every declared property is also required; properties that were optional widen to acceptnull, which keeps them optional for the model while satisfying strict validation. Type and execution stay untouched so the client still receives a locally resolvedtool_search_call. - The adaptation is scoped to client-search schemas. It must never strictify every tool globally — a user's ordinary function tools keep their declared schemas.
- Local
$ref/$defsreferences can be inlined on request, bounded by an explicit byte and node budget. A reference that is recursive, external, missing, or otherwise unsupported fails rather than deleting the constraint it carried. - The widened nullability is tracked and undone on the way back, so the client sees the schema it declared.
Screenshots N/A.
OS Type
- OS: macOS
- Version: 26.x / arm64 (not platform specific)
Additional context
Scope in this issue
schema.complete-search-required: tri-state. Absent follows the route convention;truecompletes the required fields and widens optional fields to nullable;falsekeeps the declared schemas.schema.local-refs:preserve(default) orinline. Inlining expands local references under a byte and node budget; recursive, external, missing, or unsupported references fail with a fixed reason instead of silently dropping the constraint.- Nullability analysis that follows the schema properly —
oneOfunion/intersection semantics, negation, string sets, and nested paths — rather than a textual rewrite, so a completed schema is still a valid schema. - The convention folds exactly three strategies for the one provider that needs them:
custom-tools: function,custom-grammar: describe,schema.complete-search-required: true. It never setsschema.local-refsto a rewriting value for any provider —inlinestays opt-in everywhere,metaincluded, because the convention does not expand a client-authored$ref.
Out of scope
tool_search discovery mechanics, budget accounting, and the outbound send guard.
Invariants
- User-authored function tool schemas are never modified.
- A schema constraint is never silently deleted. If it cannot be carried portably, the request fails with an explicit reason.
Related issues
Depends on the route policy surface. Read together with the custom-tool bridge issue — the meta convention needs both.
Source: router-for-me/CLIProxyAPI