Skip to content

fix(runtime): use camelCase OpenAI-compatible provider option keys #1430

Closed

Description

@Astro-Han

Problem

After the AI SDK v7 upgrade in #1198, requests to Z.AI Coding Plan emit repeated deprecation warnings:

AI SDK Warning (zai-coding-plan.chat / glm-5.2): Deprecated: "providerOptions key 'zai-coding-plan'". Use 'zaiCodingPlan' instead.

The request still works because @ai-sdk/[email protected] currently accepts both forms, but it emits one warning for every model invocation. Agent/tool loops therefore produce the warning repeatedly.

Cause

buildProviderOptions currently emits the raw provider name as the options namespace:

{ 'zai-coding-plan': { reasoningEffort: 'high' } }

@ai-sdk/openai-compatible now expects camelCase provider option keys:

{ zaiCodingPlan: { reasoningEffort: 'high' } }

The current regression test explicitly pins the deprecated dashed namespace:

  • packages/runtime/src/model-factory.ts
  • packages/runtime/src/__tests__/model-factory-thinking.test.ts

This may also affect other OpenAI-compatible providers whose configured names contain hyphens.

Expected behavior

OpenAI-compatible provider options use the SDK's current camelCase namespace without changing the provider ID, model routing, or wire-level request fields.

Acceptance criteria

  • zai-coding-plan provider options are emitted under zaiCodingPlan.
  • reasoningEffort still reaches the request as reasoning_effort.
  • Dashed OpenAI-compatible provider names are handled consistently rather than special-casing only Z.AI.
  • Regression coverage exercises the current AI SDK parsing path and confirms that no deprecation warning is produced.

Activity

  1. BruceLoveDecimal commented on Jul 24, 2026

    @BruceLoveDecimal

    hi, can i try this?

  2. Astro-Han commented on Jul 24, 2026

    @Astro-Han
    ContributorAuthor

    Yes please! Assigned.

  3. Astro-Han commented on Jul 24, 2026

    @Astro-Han
    ContributorAuthor

    We could also look at other providers to see if there are similar issues.

  4. added
    help wanted
    on Aug 8, 2026
  5. yihanzhu commented on Aug 20, 2026

    @yihanzhu
    Contributor

    Assignee seems inactive. can I pick this up?

  6. Astro-Han commented on Aug 20, 2026

    @Astro-Han
    ContributorAuthor

    @yihanzhu Reassigned! Look forward to your PR~

  7. added a commit that references this issue on Aug 20, 2026
    77066f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issuehelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions