Skip to content

Python: agents send an empty tool list when a provider exposes no model-visible tools #602

Description

@cornelcroi

When a tool provider yields no model-visible tools (e.g. an MCP server whose tools are all app-only, after the visibility filtering in #594), BedrockLLMAgent still sends toolConfig: {"tools": []} — which Bedrock rejects (toolConfig.tools requires ≥1 entry) — and AnthropicAgent attaches an empty tools: [].

Guard both: only attach the tool config when it produces a non-empty tool list. Additive robustness fix; the only behavior change is not sending an empty tool list. (OpenAI agent has no tool_config path.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions