Empty function tool parameters cause 500 error with Anthropic provider
Type: Bug
Description
When a function tool is defined with empty parameters ("parameters": {}), the Responses API forwards it as-is to the inference provider. Anthropic's OpenAI-compatible endpoint rejects this because parameters.type is a required field, returning:
500 - tools.0.function.parameters.type: Field required
Similarly, if parameters contains properties but no type field, the request is also rejected.
Steps to Reproduce
- Configure OGX with
remote::anthropic provider
- Create a response with a no-argument function tool:
client.responses.create(
model="anthropic/claude-sonnet-4-6",
input=[{"role": "user", "content": "what's the current time?"}],
tools=[{
"type": "function",
"name": "get_current_time",
"description": "Get the current time",
"parameters": {},
}],
)
- Server returns 500
Verified Against Anthropic API
input_schema |
Result |
Error |
{} |
400 |
tools.0.custom.input_schema.type: Field required |
{"properties": {"tz": {"type": "string"}}} |
400 |
tools.0.custom.input_schema.type: Field required |
{"type": "object"} |
200 |
Works |
Empty function tool parameters cause 500 error with Anthropic provider
Type: Bug
Description
When a function tool is defined with empty parameters (
"parameters": {}), the Responses API forwards it as-is to the inference provider. Anthropic's OpenAI-compatible endpoint rejects this becauseparameters.typeis a required field, returning:Similarly, if
parameterscontains properties but notypefield, the request is also rejected.Steps to Reproduce
remote::anthropicproviderVerified Against Anthropic API
input_schema{}tools.0.custom.input_schema.type: Field required{"properties": {"tz": {"type": "string"}}}tools.0.custom.input_schema.type: Field required{"type": "object"}