Skip to content

fix(opencode): preserve Astra priority service tier - #47519

Closed
GuestAUser wants to merge 1 commit into
anomalyco:devfrom
GuestAUser:astra-priority-sdk
Closed

fix(opencode): preserve Astra priority service tier#47519
GuestAUser wants to merge 1 commit into
anomalyco:devfrom
GuestAUser:astra-priority-sdk

Conversation

@GuestAUser

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #47506

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Updates the bundled @ai-sdk/openai dependency from 3.0.84 to 3.0.88 in opencode and core. The older SDK excludes GPT-6 from its Priority capability check and removes service_tier: "priority" from otherwise valid Astra requests. The newer SDK recognizes it.

The regression goes through OpenCode's provider resolution and LLM.stream to a local HTTP endpoint. It checks Priority and Default with the canonical Astra model ID, max effort, an explicitly selected detailed summary, stateless encrypted reasoning, and tool replay/schema handling. The SDK package identity and authentication/transport code stay unchanged.

How did you verify your code works?

  • Before: the new two-case regression had one pass and one failure on 3.0.84: Priority was undefined; Default and the preceding preservation assertions passed.
  • After: 732 tests passed in the selected OpenCode suites below, including both new cases; another 7 passed in the core OpenAI provider suite. Both packages passed typechecking.
  • Frozen-lockfile installation and formatting checks passed. The lockfile diff contains only the affected SDK pins/resolutions and their provider-utils dependency.

Commands ran with configuration/native-runtime environment overrides unset, using Bun 1.4.0:

# packages/opencode
bun test --timeout 30000 test/session/llm.test.ts test/provider/transform.test.ts test/provider/provider.test.ts test/plugin/openai-ws.test.ts test/plugin/auth-override.test.ts test/auth/auth.test.ts
bun typecheck

# packages/core
bun test --timeout 30000 test/plugin/provider-openai.test.ts
bun typecheck

# repository root
bun install --frozen-lockfile --ignore-scripts

The new Astra assertions use the API-key request path; existing auth, WebSocket, and cancellation checks passed unchanged. This verifies the requested tier, not live account entitlement or the tier ultimately granted by OpenAI. No production binary was built.

Screenshots / recordings

Not applicable; no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

- Update the bundled OpenAI SDK to 3.0.88 in opencode and core so GPT-6 Priority requests retain service_tier.
- Add request-path regression coverage for Priority and Default while preserving max effort, explicitly detailed summaries, canonical model identity, encrypted stateless replay, tool schemas, and API-key authentication.
- Keep provider identity and transport code unchanged, with lockfile changes limited to the affected SDK and provider-utils resolutions.
@opencode-agent

opencode-agent Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for identifying this and verifying the SDK update. We are taking the dependency-only change forward in a separate PR, and have included you as a commit co-author. Closing this version to keep the implementation focused on the package bump.

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.

GPT-6 Astra Priority tier is stripped by the bundled OpenAI SDK

1 participant