Repository navigation
Description
Summary
claude-sonnet-5 behind the rbi_genai gateway can accept normal openai-responses requests, but tool-calling fails because tools[].custom.strict is being sent down a Bedrock/Claude path that rejects it.
Observed upstream error:
Provider unavailable
WHAT HAPPENED: the provider rejected the request. litellm.BadRequestError: BedrockException - {"message":"The model returned the following errors: tools.0.custom.strict: Extra inputs are not permitted"}. Received Model Group=claude-sonnet-5
Available Model Group Fallbacks=None
NEXT STEP: retry; if it persists, switch provider/model.
Why this looks like a real compatibility leak
This does not look like "Claude must globally use Anthropic compatibility".
The same provider/model path was already able to serve non-tool requests via the configured OpenAI-compatible surface. The failure only appears once tool schema is involved.
So the likely bug is narrower:
- a tool-schema field from the OpenAI-style surface (
custom.strict) is leaking into a Bedrock/Claude path that does not accept it, or - the provider adapter lacks capability metadata for this model/path and should not emit
strictthere.
Expected behavior
vis should not send tool-schema fields that the selected provider/model path cannot accept.
Possible fixes
One of:
- Strip
tools[].custom.strictfor provider/model paths that do not support it. - Add capability metadata such as
supports_strict_tool_schema = false. - Normalize tool payloads per compatibility surface before they hit the provider.
- If tool-calling on this path really requires a different transport, encode that as a feature/path-specific capability decision, not a blanket provider-level switch.
Why this may belong in blockether/svar
If vis is delegating provider request shaping / compatibility translation to svar, the actual fix may belong there rather than in the top-level UI/app layer. I am filing here first because this is where the user-facing failure surfaced, but the payload-normalization bug might be lower in the stack.
Repro shape
- provider:
rbi_genai - configured compatibility:
openai-responses - model:
claude-sonnet-5 - non-tool request: succeeds
- tool request: fails with
tools.0.custom.strict: Extra inputs are not permitted
Expected outcome
Tool-calling should either:
- work on this provider/model path with the unsupported field removed, or
- fail with a specific, actionable capability error instead of leaking an upstream schema mismatch.
Activity
kwojcik-blockether commentedon Jul 29, 2026
Root cause is upstream, not in Vis.
Vis/svar never emit
strict(nor a tool-leveladditionalProperties) in a tool definition —tool-def->wire(svar/internal/llm.clj) emits exactly{name, description, parameters|input_schema}for every api-style, and there is notype: "custom"anywhere. The field is injected by LiteLLM: PR BerriAI/litellm#29814 started forwardingstrict/additionalPropertiesinto the Bedrock ConversetoolSpec, gated only onget_bedrock_base_model(model).startswith("anthropic"). Bedrock then routes some Claude variants through an Anthropic-compatible validator that mapstoolSpecto the nativecustomtool shape and rejects the extra key —tools.0.custom.strict: Extra inputs are not permitted.Upstream fixes/state: litellm#31582 → #31585/#31923 (Opus 4.7/4.8), #31943 (Sonnet 4), driven by a
bedrock_converse_supports_strict_tools: falseflag inmodel_prices_and_context_window.json; #33193 tracks Sonnet 5. So the actual remedy is: upgrade the gateway, or set that flag for the model in the gateway model map.What Vis ships now (7abfd12, svar b84dc40040): the failure is no longer a generic "provider rejected the request / retry".
provider_error.cljdetects a gateway-injected tool field, classifies it as the terminal:tool-schemakind (non-retryable), titles itGateway sent an unsupported tool field: strict, states that Vis never sends that field, and the NEXT STEP points at the gateway (bedrock_converse_supports_strict_tools: false/ newer LiteLLM) or a model switch instead of falsely blaming an extension schema. svarenrich-tool-schema-rejectionnow also resolvestools.N.custom.strictto the canonical tool name/field. Covered byprovider_error_test/gateway-injected-tool-field-testandllm_tool_calling_test.Closing: nothing left to change in Vis — no payload we control carries the rejected field.