Skip to content

fix(bedrock_mantle): set GPT-5.6 model mode to chat and add batch endpoint (#46905) - #47251

Closed
ashishsoni-ai wants to merge 1 commit into
BerriAI:mainfrom
ashishsoni-ai:fix/bedrock-mantle-gpt-5-6-mode-chat
Closed

ashishsoni-ai wants to merge 1 commit into
BerriAI:mainfrom
ashishsoni-ai:fix/bedrock-mantle-gpt-5-6-mode-chat

Conversation

@ashishsoni-ai

Copy link
Copy Markdown

TLDR

Problem this solves:

  • Bedrock Mantle GPT-5.6 models (openai.gpt-5.6-sol, openai.gpt-5.6-terra, openai.gpt-5.6-luna, and us-gov-west-1 variants) retained "mode": "responses".
  • Native /v1/chat/completions requests misclassified or required manual overrides despite native chat completions being supported.
  • "/v1/batch" endpoint was missing from supported_endpoints.

How it solves it:

  • Sets "mode": "chat" for all 5 Bedrock Mantle GPT-5.6 models and GovCloud variants.
  • Adds "/v1/batch" to supported_endpoints.
  • Preserves "use_openai_responses_path": true for Responses API routing and reasoning-summary fallback compatibility.
  • Synchronizes changes across model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json.
  • Adds unit tests covering mode, endpoints, backup synchronization, and litellm.get_model_info resolution.

User Flow

Before: a developer using Bedrock Mantle GPT-5.6 models has chat requests resolved as responses mode unless manually pinned.

  1. Developer initializes LiteLLM with model bedrock_mantle/openai.gpt-5.6-sol.
  2. LiteLLM resolves model metadata with "mode": "responses" and supported_endpoints missing "/v1/batch".
  3. Standard chat completions require manual mode overrides or risk routing mismatches.

After: the same model resolves natively with "mode": "chat" and includes batch support.

  1. Developer initializes LiteLLM with model bedrock_mantle/openai.gpt-5.6-sol.
  2. LiteLLM resolves model metadata with "mode": "chat", retaining "use_openai_responses_path": true.
  3. Standard chat completions and batch requests route natively without manual overrides.

Relevant issues

Fixes #46905

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Screenshots / Proof of Fix

Before (e979bd0)

import litellm

info = litellm.get_model_info("bedrock_mantle/openai.gpt-5.6-sol")
print(info["mode"])
# 'responses'
print(info["supported_endpoints"])
# ['/v1/chat/completions', '/v1/responses']

After (df6dba9)

import litellm

info = litellm.get_model_info("bedrock_mantle/openai.gpt-5.6-sol")
print(info["mode"])
# 'chat'
print(info["supported_endpoints"])
# ['/v1/chat/completions', '/v1/batch', '/v1/responses']
============================= test session starts =============================
platform win32 -- Python 3.14.6, pytest-9.0.3, pluggy-1.6.0
collected 15 items

tests\unit\test_bedrock_mantle_gpt_5_6_model_metadata.py ............... [100%]

============================= 15 passed in 0.91s ==============================

Type

🐛 Bug Fix
✅ Test

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

…point (BerriAI#46905)

Update mode to 'chat' for bedrock_mantle GPT-5.6 models (openai.gpt-5.6-sol, openai.gpt-5.6-terra, openai.gpt-5.6-luna, and us-gov-west-1 variants) and include '/v1/batch' in supported_endpoints while preserving 'use_openai_responses_path': true.

Fixes BerriAI#46905
@codspeed

codspeed Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ 1 benchmark spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 32 untouched benchmarks


Comparing ashishsoni-ai:fix/bedrock-mantle-gpt-5-6-mode-chat (df6dba9) with main (e979bd0)

Open in CodSpeed

@codecov

codecov Bot commented Oct 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ashishsoni-ai

Copy link
Copy Markdown
Author

Closing this PR after reviewing the CI test failures and repository history:

Background & Architecture

On Amazon Bedrock Mantle, OpenAI frontier models (gpt-5.4, gpt-5.5, gpt-5.6-*, gpt-6-*) intentionally default to "mode": "responses" in model_prices_and_context_window.json.

As documented in PR #38225 (LIT-6096):

"mode stays responses on purpose: Mantle's native chat endpoint rejects function tools unless reasoning_effort is 'none', so the bridge is load-bearing."

Additionally, Mantle's native /chat/completions endpoint does not support n > 1 (which triggered UnsupportedParamsError in TestBedrockMantleConfig::test_what_mantle_chat_cannot_serve_reaches_the_responses_api).

Existing Opt-in

Operators wishing to route unbridged traffic through Mantle's native /chat/completions can already pin model_info: {mode: "chat"} on their deployment, which is explicitly supported and tested alongside the unpinned responses default (see tests/unit/proxy/test_health_check_max_tokens.py::test_run_model_health_check_probes_the_api_a_mantle_gpt_deployment_sends_chat_to).

Changing the default mode in the shared price map alters this load-bearing architecture and breaks the test contracts in test_health_check_max_tokens.py, test_bedrock_mantle_transformation.py, and test_completion_extras_litellm_responses_transformation_transformation.py.

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.

[Bug]: Bedrock Mantle GPT-5.6 entries still use mode responses

2 participants