Repository navigation
Description
Thanks for keeping the LiteLLM pin in one place; it made comparing versions quick.
Is there an existing issue for the same bug?
- I have searched existing issues and this is not a duplicate.
Bug Description
The lock (uv.lock, also used by CI and the agent-server image) has LiteLLM 1.93.0. It turns the SDK default reasoning_effort="high" into an Anthropic-style thinking field on the Converse request, which Bedrock GPT-6 Sol/Luna/Astra and GPT-5.6 reject with a 400. LiteLLM 1.102.x sends reasoning.effort instead; pip install openhands-sdk already gets 1.102.1.
Expected Behavior
The ids below answer with default settings on the lock too.
Actual Behavior
uv run python d3.py bedrock/us.openai.gpt-6-sol bedrock/global.openai.gpt-6-astra bedrock/us.openai.gpt-5.6-sol (code sample below) on main @ 5b36cac:
litellm 1.93.0
MODEL bedrock/us.openai.gpt-6-sol reasoning_effort high uses_responses_api True
ERR LLMBadRequestError litellm.BadRequestError: BedrockException - {"message":"The model returned the following errors: {\"error\":{\"code\":\"unknown_parameter\",\"message\":\"Unknown parameter: 'thinking'.\",\"param\":\"thinking\",\"type\":\"invalid_request_error\"}}"}
MODEL bedrock/global.openai.gpt-6-astra reasoning_effort high uses_responses_api True
ERR LLMBadRequestError litellm.BadRequestError: BedrockException - {"message":"The model returned the following errors: {\"error\":{\"code\":\"unknown_parameter\",\"message\":\"Unknown parameter: 'thinking'.\",\"param\":\"thinking\",\"type\":\"invalid_request_error\"}}"}
MODEL bedrock/us.openai.gpt-5.6-sol reasoning_effort high uses_responses_api True
ERR LLMBadRequestError litellm.BadRequestError: BedrockException - {"message":"The model returned the following errors: {\"error\":{\"code\":\"unknown_parameter\",\"message\":\"Unknown parameter: 'thinking'.\",\"param\":\"thinking\",\"type\":\"invalid_request_error\"}}"}
Same script, SDK from main with litellm==1.102.1 in a separate venv:
litellm 1.102.1
MODEL bedrock/us.openai.gpt-6-sol reasoning_effort high uses_responses_api True
OK pong
MODEL bedrock/global.openai.gpt-6-astra reasoning_effort high uses_responses_api True
OK pong
MODEL bedrock/us.openai.gpt-5.6-sol reasoning_effort high uses_responses_api True
OK pong
Steps to Reproduce
uv sync --extra boto3on main, Bedrock credentials in the environment (us-east-1).uv run python d3.py bedrock/us.openai.gpt-6-sol
Acceptance Criteria
- On the lock, the ids below answer with the default
reasoning_effort - The Converse request carries
reasoning.effort, notthinking
Installation Method
uv sync from a clone of main
SDK Version
main @ 5b36cac (openhands-sdk 1.49.5)
Model Name (if applicable)
bedrock/us.openai.gpt-6-sol, bedrock/global.openai.gpt-6-sol, bedrock/us.openai.gpt-6-luna, bedrock/us.openai.gpt-6-astra, bedrock/global.openai.gpt-6-astra, bedrock/us.openai.gpt-5.6-sol, bedrock/us.openai.gpt-5.6-luna
Minimal Code Sample
import os, sys, importlib.metadata as md
os.environ["OPENHANDS_SUPPRESS_BANNER"] = "1"
from openhands.sdk import LLM
from openhands.sdk.llm import Message, TextContent
print("litellm", md.version("litellm"))
for model in sys.argv[1:]:
llm = LLM(model=model, usage_id="t", aws_region_name="us-east-1", num_retries=0)
print("MODEL", model, "reasoning_effort", llm.reasoning_effort, "uses_responses_api", llm.uses_responses_api())
try:
r = llm.completion([Message(role="user", content=[TextContent(text="Reply with exactly: pong")])])
print(" OK", "".join(getattr(c, "text", "") for c in r.message.content))
except Exception as e:
print(" ERR", type(e).__name__, str(e)[:330])Screenshots and Additional Context
LLM(...), us-east-1 |
lock (LiteLLM 1.93.0) | LiteLLM 1.102.1 |
|---|---|---|
GPT-6 Sol, Luna, Astra (us.) and Sol, Astra (global.), default effort |
400 thinking |
✅ pong |
| GPT-5.6 Sol, Luna, default effort | 400 thinking |
✅ pong |
GPT-6 Sol, Luna, Astra: generate() with a tool, then the tool result |
400 thinking |
✅ tool call, then Four |
| GPT-6 Sol, Astra: streaming | 400 thinking |
✅ |
all seven ids, reasoning_effort=None |
✅ | ✅ |
GPT-6 Sol/Luna and GPT-5.6, reasoning_effort="none" |
✅ | ✅ |
GPT-6 Astra, reasoning_effort="none" |
✅ (1.93.0 drops the field) | 400 Unsupported value: 'none' |
Workaround on the lock: reasoning_effort=None. "none" passes on the lock only because 1.93.0 drops it; GPT-6 Astra rejects it after a bump.
Notes for the next LiteLLM bump
additionalModelRequestFields from litellm.completion(model="bedrock/<id>", reasoning_effort="high"), captured before sending:
| LiteLLM | GPT-5.6 Sol | GPT-6 Sol / Luna / Astra |
|---|---|---|
| 1.93.0 (lock) | thinking |
thinking |
| 1.101.0, 1.101.2 | reasoning.effort ✅ |
thinking |
| 1.102.0, 1.102.1 | reasoning.effort ✅ |
reasoning.effort ✅ |
- The pin is two lines in the root
pyproject.toml:litellm==1.93.0inconstraint-dependenciesandexclude-newer-package = { litellm = "2026-07-20T00:00:00Z" }. Uploads: 1.102.0 on 09-20, 1.102.1 on 09-23. - A trial lock at 1.102.1 (both lines changed,
uv lock) turns 10tests/sdk/llmtests red (main: 1018 passed); one is thecache_creation_tokensAttributeError from AttributeError in Telemetry._cache_buckets for providers without prompt caching #5168. Leaving the bump with you, like Upgrade LiteLLM to 1.84.1 #3233 and feat(llm): verify Kimi K3 and Claude Opus 5 with LiteLLM 1.93 #4284. - GPT-6 Sol/Luna fail this way since 09-23: LiteLLM loads its hosted model map from
mainat import (SDK outsources the capabilities of models it vouches for to a third party's main branch #4880), and their rows landed then (feat(bedrock): add gpt-6-sol and gpt-6-luna model pricing BerriAI/litellm#42746). - With
LITELLM_LOCAL_MODEL_COST_MAP=True, 1.93.0 knows none of these ids and 1.102.1 lacks GPT-6 Sol/Luna; those calls take the InvokeModel route and fail with "Error processing". - The [Bug]: Prompt-based tool calling fails on Bedrock OpenAI models (gpt-oss, GPT-5.6, GPT-6 Sol/Luna/Astra) because stop words are sent #5290 repro uses
reasoning_effort=Nonefor this reason.
FAILED tests/sdk/llm/test_chat_options.py::test_litellm_translates_claude_5_reasoning_to_adaptive_thinking[claude-sonnet-5-anthropic]
FAILED tests/sdk/llm/test_chat_options.py::test_litellm_translates_claude_5_reasoning_to_adaptive_thinking[us.anthropic.claude-sonnet-5-v1:0-bedrock]
FAILED tests/sdk/llm/test_chat_options.py::test_litellm_translates_claude_5_reasoning_to_adaptive_thinking[claude-opus-5-anthropic]
FAILED tests/sdk/llm/test_chat_options.py::test_litellm_translates_claude_5_reasoning_to_adaptive_thinking[us.anthropic.claude-opus-5-v1:0-bedrock]
FAILED tests/sdk/llm/test_model_features.py::test_reasoning_effort_support[moonshot/kimi-k2.5-False]
FAILED tests/sdk/llm/test_model_features.py::test_get_features_with_provider_prefix
FAILED tests/sdk/llm/test_llm_completion.py::test_llm_streaming_preserves_cache_read_tokens
FAILED tests/sdk/llm/test_model_features.py::test_reasoning_effort_overrides_are_not_redundant
FAILED tests/sdk/llm/test_responses_parsing_and_kwargs.py::test_responses_reasoning_options_not_sent_for_non_reasoning_model
FAILED tests/sdk/llm/test_responses_parsing_and_kwargs.py::test_responses_encrypted_reasoning_not_added_for_non_reasoning_model
10 failed, 1008 passed
I used Claude Code to bisect the versions, search the tracker and run the checks.
Activity
all-hands-bot commentedon Sep 24, 2026
The following comments were added by the OpenHands AI agent.
Decision needed
I reproduced the report against a scratch clone (main @
e21d776,uv sync --extra boto3, us-east-1) and confirmed the mechanism: on the lock, LiteLLM 1.93.0 maps Bedrock reasoning toadditionalModelRequestFields.thinkingfor these ids, and 1.102.x maps it toreasoning.effort. Two decisions blockready-for-dev; both are yours to make, not inferable from the repo.1. Which version, and do we override the 7-day guardrail? The root
[tool.uv]table setsexclude-newer = "7 days", and.agents/skills/custom-codereview-guide.mdrequires a maintainer decision before merging a distribution uploaded less than seven days ago. I checked PyPI upload times and the per-version wire output:thinking(400)thinking(400)thinking(400)reasoning.effortreasoning.effortreasoning.effortreasoning.effortreasoning.effortThe only releases outside the guardrail today (
1.101.x) do not fix GPT-6 Sol/Luna/Astra, and 1.102.1 clears the window around 2026-09-30. Should the PR wait for 1.102.1 to clear, or overrideexclude-newer-packagefor litellm and record the override in the PR (as #4284 and #3233 did)? Which exact version should the lock target — and shouldopenhands-sdk'slitellm>=1.93.0floor move with it, so a constrained resolver cannot select the broken 1.93.0 thatpip install openhands-sdkavoids only by taking latest?2. Scope: one bump PR, or a narrower fix? A trial lock at 1.102.1 turns
tests/sdk/llmred. I ran the suite on both locks: 3 failed / 1033 passed at 1.93.0 (two are pre-existing environment path failures intests/sdk/llm/auth/test_credentials.py), versus 11 failed / 1024 passed at 1.102.1. The bump-specific failures are the fourtest_litellm_translates_claude_5_reasoning_to_adaptive_thinkingcases (upstream now adds adisplaykey to the adaptivethinkingdict),test_reasoning_effort_support[moonshot/kimi-k2.5],test_get_features_with_provider_prefix(upstream now reportsreasoning_effortforopenai/gpt-4o, which also silently dropstemperature/top_pand addsreasoning_effortinselect_chat_options), the twotest_responses_*_not_sent_for_non_reasoning_modelcases, andtest_llm_streaming_preserves_cache_read_tokens(thePromptTokensDetailsWrapper.cache_creation_tokensAttributeErrortracked separately as #5168). Notetest_reasoning_effort_overrides_are_not_redundantis already red on the current lock, because LiteLLM fetches its model map frommainat import (#4880) and now reportsgpt-5.2-codexas supportingreasoning_effort. Should this land as a single LiteLLM-upgrade PR that also carries the coupled expectation and code updates (and either absorbs #5168 or depends on it), or should #5168 land first and this follow?Bharrguv commentedon Oct 4, 2026
I reproduced this issue locally and have a focused fix with regression coverage ready in PR #5463. Could this issue be marked
ready-for-devif the scope looks appropriate?kimnamu commentedon Oct 4, 2026
Thanks @Bharrguv for digging into this and for putting #5463 together with tests.
As far as I can tell, #5463 is aimed at the stop-word bug from #5290, and the
thinking400 in this issue still happens on its head. This one depends on the LiteLLM version in the lock (table in the issue body), so it still needs the version decision from the triage comment above.#5463 head
c6502f4b, lock (LiteLLM 1.93.0), defaultreasoning_effort, us-east-1, request captured before sending:If the label is for the PR description check: #5290 already has
ready-for-dev, and the check passes locally once## Issue NumbersaysFixes #5290instead ofN/A.#5463 and the
us./global.ids from #5290The GPT-6 and GPT-5.6 ids in #5290 are inference profile ids like
bedrock/us.openai.gpt-6-sol."bedrock/openai."isn't a substring of those, so on #5463's headget_features(...).supports_stop_wordsisFalseforbedrock/openai.gpt-oss-120b-1:0and stillTruefor all eightus./global.ids listed in #5290 and here. The #5290 repro (prompt-based tool calling,reasoning_effort=None) on the same head:#5291 (opened for #5290 on 09-24) matches
openai.gpt-, and its tests includeus./global.ids. I'm happy to go with whichever the maintainers prefer.