Skip to content

feat(ai): add BytePlus/Ark provider - #63471

Closed
drpr wants to merge 2 commits into
anomalyco:devfrom
drpr:feat/ark-provider
Closed

drpr wants to merge 2 commits into
anomalyco:devfrom
drpr:feat/ark-provider

Conversation

@drpr

@drpr drpr commented Nov 12, 2026

Copy link
Copy Markdown

Summary

Add a BytePlus/Ark provider that routes requests through the existing
OpenAI-compatible route/client with Volcengine-specific defaults.

Changes

  • packages/ai/src/providers/ark.ts: New provider extending
    openai-compatible with the Ark base URL, model list, and Volcengine
    router options (region, thinking budget, auto-use of prompt cache).
  • packages/ai/package.json: Export ./providers/ark subpath.
  • packages/ai/test/provider/ark.test.ts: Provider construction and
    header forwarding tests.

Notes

  • Uses capabilities: { tools: { strict: false }, promptCacheKey: true }
    since Ark does not support strict tool mode but does support prompt
    caching via Volcengine's X-Ark-Prompt-Id header.
  • maxTokens is passed at the top level per the current AI SDK API.

alex added 2 commits November 12, 2026 13:52
… API

The Ark provider was ported from an older revision of the AI package and
still referenced symbols that no longer exist.

- Replace the removed `RouteDefaultsInput` with `RequestOptions`, which is
  what the route defaults accept today.
- Move `supportsStrictMode` and `supportsPromptCacheKey` out of
  `compatibility` and into `capabilities`, where strict tool schemas and
  prompt cache keys are declared now.
- Export `./providers/ark` from the package so `@opencode/ai/providers/ark`
  resolves for the runtime provider registry.
- Drop the nested `generation` object from the request fixture; generation
  knobs sit at the top level of a request.
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@opencodejr opencodejr Bot closed this Nov 12, 2026
@opencodejr

opencodejr Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Thanks for working on BytePlus/Volcengine Ark support, @drpr!

This pull request is too big to review as one change (about 2,300 changed lines). It also covers more than the description says: besides the Ark provider, it adds a new way for opencode to ship its own catalog entries (a 1,700-line local.txt merged over models.dev) and a generic GET /models discovery plugin that also covers other providers such as MiniMax. Could you split it into smaller, focused pull requests that can each be reviewed on its own? For example:

  • Ark provider in packages/ai: providers/ark.ts, its export and its tests.
  • Catalog entries: the BytePlus/Volcengine provider and model data. This would ideally go upstream to models.dev rather than a bundled local catalog.
  • Core wiring: the aisdk-native mapping and variant handling for the Ark providers, plus the provider icon.
  • Live model discovery (if still wanted): the generic OpenAI-compatible GET /models plugin, as its own proposal, ideally discussed in an issue first since it affects several providers.
  • The provider-error.ts comment edit, if you want to keep it.

You're welcome to open those!

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

Labels

needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant