Skip to content

[BUG] OpenAI Compatible provider (Bedrock backend) rejects maxItems in tool schema — normalizeToolSchema() fix may not cover this code path #869

Description

@lancekuttner

Problem (one or two sentences)

Since release of v3.66.0 - When using Zoo Code's OpenAI Compatible provider pointed at a LiteLLM proxy backed by AWS Bedrock, tool-enabled requests fail with a 400 error.

Context (who is affected and when)

Any requests to e.g. Claude Sonnet on Bedrock, regardless of using OpenAI Compatible or the Zoo-native LiteLLM

Reproduction steps

  1. Configure a Zoo Code provider profile with API Provider = OpenAI Compatible, Base URL pointing at a LiteLLM proxy backed by AWS Bedrock, and an API key for that proxy.
  2. Send any request in Code/Ask/Architect/Debug/Orchestrator mode that triggers a tool-enabled request.
  3. Observe the 400 error above; no completion is returned.

Expected result

Tool schemas sent through the OpenAI Compatible provider should be normalized to a JSON Schema subset compatible with whatever backend the OpenAI-compatible endpoint is ultimately proxying to — including Bedrock's stricter subset — the same normalization already applied via normalizeToolSchema() elsewhere in the codebase (PR #10148, PR #10276).

Actual result

The request fails outright. Bedrock's schema validator rejects the maxItems keyword on an array parameter in the first tool definition, blocking all tool use when Bedrock is reached via an OpenAI-compatible proxy layer.

Variations tried (optional)

Tried with LiteLLM API provider but similar behaviour

App Version

v3.660

API Provider (optional)

OpenAI Compatible

Model Used (optional)

Claude-4-5-Sonnet

Zoo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Request Failed
Error Code: 400
Message: litellm.BadRequestError: BedrockException - {"message":"The model returned the following errors: tools.0.custom: For 'array' type, property 'maxItems' is not supported"}. Received Model Group=claude-sonnet Available Model Group Fallbacks=None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions