Skip to content

aws: OpenAI GPT-6 Sol/Luna/Astra and GPT-5.6 on Bedrock fail every turn with a 400 when temperature or top_p is set #7413

Description

@kimnamu

Bug Description

Thanks for the quick review and merge of #7411. The _MODELS_REJECTING_SAMPLING_PARAMS guard from #6947 made that fix small, and I think the same list is all that's needed here.

OpenAI GPT-6 Sol and GPT-6 Luna became available on Bedrock on 2026-09-22, and GPT-6 Astra on 2026-09-08. Converse rejects inferenceConfig.temperature and topP for all three, and for GPT-5.6, at any value (including 1). The guard only lists Claude models, so aws.LLM(temperature=...) or top_p=... sends both fields and every turn ends in a 400:

aws.LLM(model=..., temperature=0.7, top_p=0.9), us-east-1 main (b4df92e)
us.openai.gpt-6-sol / -luna / -astra ❌ APIConnectionError after 4 attempts (about 7 s)
global.openai.gpt-6-sol / -luna / -astra ❌ same
us.openai.gpt-6-astra with only temperature=1.0, or only top_p=1.0 ❌ same
us.openai.gpt-5.6-sol ❌ same
openai.gpt-oss-120b-1:0 ✅ pong (accepts both fields)
GPT-6 without temperature/top_p ✅ pong

Expected Behavior

Same as Claude Opus 4.7+: both fields are dropped, with the existing one-time warning, and the turn succeeds. gpt-oss keeps receiving them.

Reproduction Steps

cat > repro.py <<'PY'
import asyncio
from livekit.agents.llm import ChatContext
from livekit.plugins import aws

async def main():
    for model in ("us.openai.gpt-6-sol", "us.openai.gpt-6-luna", "us.openai.gpt-6-astra",
                  "openai.gpt-oss-120b-1:0"):
        ctx = ChatContext()
        ctx.add_message(role="user", content="Say pong and nothing else.")
        try:
            r = await aws.LLM(model=model, temperature=0.7, top_p=0.9).chat(chat_ctx=ctx).collect()
            print(model, "->", repr(r.text))
        except Exception as e:
            print(model, "->", type(e).__name__, e)

asyncio.run(main())
PY
uv run python repro.py
us.openai.gpt-6-sol -> APIConnectionError failed to generate LLM completion after 4 attempts (caused by ValidationException: An error occurred (ValidationException) when calling the ConverseStream operation: This model doesn't support the temperature field. Remove temperature and try again.)
us.openai.gpt-6-luna -> APIConnectionError (same)
us.openai.gpt-6-astra -> APIConnectionError (same)
openai.gpt-oss-120b-1:0 -> 'pong'

With only top_p=0.9: This model doesn't support the topP field. Remove topP and try again.

Operating System

macOS 26 (the rejection is server-side, so any OS)

Models Used

AWS Bedrock us./global. openai.gpt-6-sol, openai.gpt-6-luna, openai.gpt-6-astra, openai.gpt-5.6-sol via livekit-plugins-aws aws.LLM

Package Versions

livekit-agents==1.8.2
livekit-plugins-aws==1.8.2   # main at b4df92e
aiobotocore==3.8.0
botocore==1.43.46
python==3.13

Session/Room/Call IDs

N/A, reproduces with aws.LLM alone.

Proposed Solution

_MODELS_REJECTING_SAMPLING_PARAMS = (
    ...,
    "claude-fable-5",
    # OpenAI GPT-5.6/GPT-6: "This model doesn't support the temperature field. Remove
    # temperature and try again." gpt-oss still accepts both, so it stays off this list.
    "gpt-5.6",
    "gpt-6",
)

The substrings don't match gpt-oss-*. Application inference profiles stay on supports_sampling_params, as today. I have this with hermetic tests and can open a PR.

Additional Context

Scope and workaround
  • Workaround today: aws.LLM(..., supports_sampling_params=False). The request goes out with inferenceConfig: {} and the turn succeeds.
  • Other GPT-6 paths through aws.LLM worked for all three models: plain, system prompt, streaming, tool round trip, tool_choice required/named, image input, usage, global. profiles.
  • The 400 is retried three times before it surfaces because nothing was streamed yet. That is a separate problem and not part of this issue.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions