Skip to content

fix(bedrock): mark the Bedrock gpt-5.6 and gpt-6-astra routes as tool capable (1.7.6) - #49

Draft
achraf-mer wants to merge 1 commit into
h2oai:h2o-1.7.6from
achraf-mer:h2o/1.7.6-bedrock-gpt-tools
Draft

achraf-mer wants to merge 1 commit into
h2oai:h2o-1.7.6from
achraf-mer:h2o/1.7.6-bedrock-gpt-tools

Conversation

@achraf-mer

Copy link
Copy Markdown
Collaborator

Fixes the 1.7.6 side of h2oai/h2ogpte#13426: the MCP-only runner (and function calling on the OpenAI-compatible API) never sees any tool on the Bedrock gpt-5.6 and gpt-6-astra routes.

Cause

On this pin, Bedrock Converse treats tools as supported only for anthropic/mistral/cohere/llama/nova prefixes, or when the cost map has supports_function_calling. The bundled map has no us./global.openai.gpt-5.6-* or gpt-6-astra keys, so drop_params: true silently strips every tool. The model then answers "I can't access the tools". gpt-oss-120b has a key, which is why it works.

Change

Adds 8 keys (us. and global. x gpt-5.6-sol/terra/luna, gpt-6-astra) to both cost map files, copied from h2o-main and trimmed to provider, mode, limits, base costs, supports_function_calling and supports_tool_choice. supports_reasoning is left out on purpose: on this pin it would start forwarding reasoning_effort as Anthropic thinking.

Base h2o-1.7.6 is a new branch at fe1a2d4, the litellm pin of h2ogpt h2ogpte_v1.7.6. h2o-main already has these keys.

Validation

Local h2ogpt 1.7.6 proxy (fe1a2d4, h2o hooks, LITELLM_LOCAL_MODEL_COST_MAP=True, HAMC-style bedrock/converse/us.openai.* routes), Claude Code 2.1.305 from the agent image with a stdio MCP server, Bedrock body captured:

Model Tools in Bedrock request, before After
gpt-5.6-sol 0 14 (MCP tools included)
gpt-5.6-luna 0 14
gpt-6-astra 0 14
gpt-oss-120b 14 14
claude-sonnet-5-5 14 14

OpenAI-format request to gpt-5.6-sol: tool_choice auto/required/named maps to auto/any/tool, and reasoning_effort is still dropped (no additionalModelRequestFields).

Not verified against live Bedrock: whether gpt-5.6 accepts toolChoice any/tool (h2o-main sends the same).

Follow-up

Bump the litellm pin in h2ogpt_internal h2ogpte_v1.7.6 to this commit after merge.

🤖 Generated with Claude Code

… capable

Converse only treats `tools` as supported for a fixed list of model
prefixes or when the cost map says supports_function_calling. The
bundled map had no us./global.openai.gpt-5.6-{sol,terra,luna} or
gpt-6-astra keys, so drop_params silently removed every tool and the
model never saw them (h2oai/h2ogpte#13426).

Add those 8 keys with the tool flags, limits and base costs from
h2o-main. supports_reasoning is left out on purpose: on this pin it
would start forwarding reasoning_effort as Anthropic thinking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant