Skip to content

textVerbosity injected for gpt-5.x on @ai-sdk/openai-compatible providers, breaks Bedrock Mantle via LiteLLM gateway #43911

Closed

Description

@joelstucki-taulia

Description

OpenCode auto-injects textVerbosity: "low" for any model whose ID matches gpt-5.*, regardless of the actual backend provider. Via an @ai-sdk/openai-compatible provider (e.g. a LiteLLM gateway), this becomes verbosity in the request body. When the gateway routes to AWS Bedrock ("Bedrock Mantle"), Bedrock rejects the unknown parameter and LiteLLM throws UnsupportedParamsError, breaking every request to the model (including fallback attempts).

Root cause in packages/opencode/src/provider/transform.ts (options()), current dev branch:

if (
  input.model.api.id.includes("gpt-5.") &&
  !input.model.api.id.includes("codex") &&
  !input.model.api.id.includes("-chat") &&
  input.model.providerID !== "azure"
) {
  result["textVerbosity"] = "low"
}

The guard excludes Azure but allows every other provider through, including generic @ai-sdk/openai-compatible proxies that don't understand verbosity at all. This is the same class of bug fixed for reasoningSummary in #21237 / #22352 — textVerbosity never received the equivalent fix.

A related PR (#42075) already implemented and tested the correct fix, but it was auto-closed by the compliance bot for lacking a linked issue before it could be reviewed. This issue exists to unblock a fresh PR with that fix.

Plugins

None — reproduced with a custom @ai-sdk/openai-compatible provider pointed at a LiteLLM proxy that fronts AWS Bedrock.

OpenCode version

1.18.21

Steps to reproduce

  1. Configure a provider in opencode.jsonc using "npm": "@ai-sdk/openai-compatible" pointed at a LiteLLM proxy.
  2. Configure a model whose api.id matches gpt-5.* (e.g. gpt-5.6-luna) that LiteLLM routes to AWS Bedrock ("Bedrock Mantle").
  3. Send any message to that model.
  4. Request fails with:
    litellm.UnsupportedParamsError: bedrock_mantle does not support parameters: ['verbosity'], for model=openai.gpt-5.6-luna. To drop these, set `litellm.drop_params=True` ...
    

Screenshot and/or share link

N/A (internal proxy, cannot share)

Operating System

macOS 26 (Darwin)

Terminal

N/A (also reproduces headless / non-interactive)

Activity

  1. github-actions commented on Aug 21, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. joelstucki-taulia commented on Aug 21, 2026

    @joelstucki-taulia
    ContributorAuthor

    Not a duplicate of either:

    Fix is up at #43915 (same allowlist approach used for reasoningSummary), tests passing.

  3. joelstucki-taulia commented on Aug 21, 2026

    @joelstucki-taulia
    ContributorAuthor

    Update: identified the precise trigger for why this suddenly surfaced.

    We run LiteLLM as the proxy in front of Bedrock Mantle and had been silently unaffected by this OpenCode bug for months because LiteLLM itself was silently dropping the verbosity param before v1.92.0 — completion()/acompletion() omitted verbosity from the kwargs passed to get_optional_params(), so it never reached the provider at all (fixed upstream in BerriAI/litellm#32254).

    We upgraded our proxy from LiteLLM v1.91.0 → v1.97.0, which includes that fix. Now that LiteLLM correctly forwards verbosity downstream, Bedrock Mantle's rejection of the parameter is exposed, and every gpt-5.x request through our @ai-sdk/openai-compatible provider fails with UnsupportedParamsError.

    So: this is not a new bug in OpenCode, and not a regression from a recent OpenCode release — it's a latent bug (present since at least January 2026, per transform.ts git history) that was accidentally masked by an unrelated LiteLLM bug, and is now surfaced by LiteLLM fixing their side. The fix in #43915 is still correct and still needed — OpenCode shouldn't unconditionally send verbosity to providers that don't support it regardless of what any given proxy version happens to do with it.

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

Metadata

Metadata

Assignees

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