Repository navigation
Conversation
… 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.
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
|
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
You're welcome to open those! |
Summary
Add a BytePlus/Ark provider that routes requests through the existing
OpenAI-compatible
route/clientwith Volcengine-specific defaults.Changes
packages/ai/src/providers/ark.ts: New provider extendingopenai-compatiblewith the Ark base URL, model list, and Volcenginerouter options (region, thinking budget, auto-use of prompt cache).
packages/ai/package.json: Export./providers/arksubpath.packages/ai/test/provider/ark.test.ts: Provider construction andheader forwarding tests.
Notes
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-Idheader.maxTokensis passed at the top level per the current AI SDK API.