GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(core): wire Ark provider into aisdk-native and variant system by drpr · Pull Request #63482 · anomalyco/opencode

Conversation

@drpr

@drpr drpr commented Nov 12, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #63480

Type of change

  • New feature

What does this PR do?

Register the Ark provider in the core wiring so it appears in the provider list and model catalog.

  • aisdk-native.ts: map Ark provider IDs (volcengine, volcengine-coding-plan, byteplus) to the AI SDK
  • variant.ts: Ark variant handling (arkChat)
  • provider.ts: register @opencode/ai/providers/ark as a builtin provider
  • UI: BytePlus provider icon and sprite entry

Note: byteplus is not yet in models.dev, so the icon and mapping have no effect for BytePlus until a catalog entry is added upstream. Only volcengine and volcengine-coding-plan are in models.dev today.

Depends on #63481 — this branch is rebased on top of feat/ark-provider-core and will not compile without it.

The generic GET /models discovery plugin that was previously in this PR has been removed. It affected 13 providers beyond Ark and should be proposed separately per issue #63480.

How did you verify your code works?

  • bun turbo typecheck — 35/35 packages pass (on the rebased branch that includes feat(ai): add BytePlus/Volcengine Ark provider #63481)

Checklist

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

Added by the opencode bot (AI-generated).

Related: #63481

Public API: adds @opencode/ai/providers/ark export and routes volcengine/volcengine-coding-plan through it (backwards compatible)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
alex alex
feat(ai): add BytePlus/Volcengine Ark provider
041cff2
Add an Ark provider that extends openai-compatible with Volcengine
defaults: region-based base URL, thinking budget, and prompt cache
key via the X-Ark-Prompt-Id header.

- providers/ark.ts: provider definition with Ark base URL and model list
- providers/index.ts: export the Ark provider
- package.json: export ./providers/ark subpath
- test/provider/ark.test.ts: construction and header forwarding tests
opencodejr[bot]
opencodejr Bot reviewed Nov 12, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting this out of #63471. There are a few things to sort out before this can merge.

I couldn't run it end to end. tsc -b in packages/core fails with Cannot find module '@opencode/ai/providers/ark', since that module only comes with #63481, and discovery needs real Ark keys. The existing variant tests pass.

Public API: this adds new provider IDs to the native mapping (byteplus, volcengine, volcengine-coding-plan), a new byteplus provider icon, and new environment-variable fallbacks (ARK_API_KEY, VOLCENGINE_API_KEY, ARK_CODING_PLAN_API_KEY, BYTEPLUS_API_KEY). It also changes how the model list is built for about 18 existing providers (see below). Nothing is removed, but the model lists of those existing providers would change.

Main concerns:

  1. The scope goes beyond what #63480 describes. That issue says the generic GET /models discovery plugin and the local catalog should be discussed separately. This PR still adds plugin/provider/ark.ts, which is that generic discovery plugin, and ark/models.ts, which exports OpenAICompatibleModels. The plugin runs for DeepSeek, Groq, Mistral, MiniMax, Moonshot, Zhipu, SiliconFlow, Fireworks, Novita, Perplexity, NVIDIA and Cerebras as well as Ark (details inline).
  2. It depends on #63481 to compile. The description's "35/35 typecheck pass" can't be true for this branch on its own, and the dependency PR number is still a placeholder. It may be simpler to land this together with, or after, #63481.
  3. byteplus isn't in models.dev. The aisdk-native mapping, the discovery entry and the icon have no effect for BytePlus until a byteplus catalog entry exists there. Only volcengine and volcengine-coding-plan are in models.dev today.

I'd suggest cutting this PR down to the Ark-only wiring: the aisdk-native mapping, the builtin import, the arkChat variant and the icon. Live model discovery can then be proposed separately, if it's wanted.

Related: #63481

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/core/src/plugin/provider/ark.ts Outdated
baseURL: "https://ark.ap-southeast.bytepluses.com/api/v3",
env: ["BYTEPLUS_API_KEY"],
},
// MiniMax

@opencodejr opencodejr Bot Nov 12, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From here down, the plugin covers providers that have nothing to do with Ark: MiniMax, DeepSeek, Groq, Fireworks, SiliconFlow, Moonshot, Zhipu, Novita, Perplexity, Mistral, NVIDIA and Cerebras. When any of their keys is set, the transform calls evt.add, which replaces that provider's whole models.dev model list with whatever GET /models returns. Catalog models that the endpoint doesn't list disappear. Anything the endpoint does list (Groq's Whisper, TTS and guard models, Ark's embedding, image and video models) shows up as a chat model. This is the generic discovery plugin that #63480 said would be discussed separately. Could it be limited to the Ark IDs, or left out of this PR?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/core/src/ark/models.ts Outdated
cost: previous ? previous.cost : [{ input: Money.USDPerMillionTokens.zero, output: Money.USDPerMillionTokens.zero, cache: { read: Money.USDPerMillionTokens.zero, write: Money.USDPerMillionTokens.zero } }],
status: previous?.status ?? "active",
enabled: previous?.enabled ?? true,
limit: previous?.limit ?? { context: 0, output: 0 },

@opencodejr opencodejr Bot Nov 12, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A model returned by /models that has no catalog template is added with limit: { context: 0, output: 0 }, zero cost, tools: true and text-only input. A zero context limit will likely break compaction and context accounting, and it will mislead users about cost. A missing template would be better skipped, or at least given defaults that aren't zero.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/core/src/provider.ts
["@opencode/ai/providers/azure/messages", () => import("@opencode/ai/providers/azure/messages")],
["@opencode/ai/providers/baseten", () => import("@opencode/ai/providers/baseten")],
["@opencode/ai/providers/baseten/decisions", () => import("@opencode/ai/providers/baseten/decisions")],
["@opencode/ai/providers/ark", () => import("@opencode/ai/providers/ark")],

@opencodejr opencodejr Bot Nov 12, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@opencode/ai/providers/ark doesn't exist on this branch or on dev, so tsc -b in packages/core fails here with TS2307. This needs #63481 to land first, or the two PRs need to land together.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
alex added 2 commits November 12, 2026 15:47
alex alex
feat(core): wire Ark provider into aisdk-native and variant system
785361a
Register the Ark provider in the core wiring:

- aisdk-native.ts: map Ark provider IDs to the AI SDK
- ark/models.ts: Ark model definitions
- plugin/provider/ark.ts: Ark provider plugin (config, fetch, models)
- variant.ts: Ark variant handling
- provider.ts: export the Ark provider
- ui: BytePlus provider icon and sprite entry
alex alex
refactor(core): remove generic discovery plugin from Ark wiring
c574989
Per review feedback on anomalyco#63482, the generic GET /models discovery plugin
(plugin/provider/ark.ts) and its model template helper (ark/models.ts)
are out of scope for this PR — they affect 13 providers beyond Ark and
should be proposed separately per issue anomalyco#63480.

Remove:
- plugin/provider/ark.ts: the generic OpenAI-compatible discovery plugin
- ark/models.ts: the OpenAICompatibleModels merge helper
- plugin/provider.ts: the ArkPlugin import and registration

Keep:
- aisdk-native.ts: Ark provider ID mappings (volcengine, byteplus, etc.)
- variant.ts: Ark variant handling
- provider.ts: builtin import for @opencode/ai/providers/ark
- ui: BytePlus provider icon and sprite entry
@drpr
drpr force-pushed the feat/ark-core-wiring branch from e746ca1 to c574989 Compare November 12, 2026 08:17
This was referenced Nov 12, 2026
feat: generic OpenAI-compatible GET /models discovery plugin #63490
Closed
V2: Reconcile provider catalogs with /models endpoints #40524
Open
opencodejr[bot]
opencodejr Bot reviewed Nov 12, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commits address all three earlier points: the generic discovery plugin and ark/models.ts are gone, and @opencode/ai/providers/ark now resolves. tsc -b in packages/core passes, as do the new Ark provider tests (5) and the variant and aisdk-native tests (40). I couldn't send real requests to Ark without credentials.

Public API: this adds the @opencode/ai/providers/ark export and the Ark namespace in @opencode/ai, plus a new byteplus provider icon. volcengine and volcengine-coding-plan models from models.dev are now routed through the Ark package instead of plain openai-compatible, so the request shape gains Ark's thinking switch. It's backwards compatible: nothing existing is removed.

One thing to settle: this branch now contains the #63481 commit as well, so the two PRs overlap. Whichever merges first, the other will need to be rebased or closed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

This branch has not been deployed

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

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

feat: add BytePlus/Volcengine Ark provider support

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@drpr
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.