Skip to content

feat(stage-ui): add ARK chat providers#1670

Open
Maaannnn wants to merge 2 commits intomoeru-ai:mainfrom
Maaannnn:feat/volcano
Open

feat(stage-ui): add ARK chat providers#1670
Maaannnn wants to merge 2 commits intomoeru-ai:mainfrom
Maaannnn:feat/volcano

Conversation

@Maaannnn
Copy link
Copy Markdown

Description

Adds ARK chat provider definitions for volcengine-coding-plan, byteplus, and byteplus-coding-plan in the stage-ui provider registry.

This also extracts shared ARK provider setup into a reusable helper, localizes the new provider labels, and teaches the OpenAI-compatible validator to normalize prefixed model IDs before chat probes.

Linked Issues

None.

Additional Context

Behavior changes:

  • registers the new ARK chat providers in the catalog
  • uses spec base URLs and prefixed model lists for BytePlus and coding-plan variants
  • strips provider prefixes before chat calls and validation probes

Tests:

  • cd packages/stage-ui && pnpm exec vitest run src/libs/providers/providers/ark-providers.test.ts src/libs/providers/validators/openai-compatible.test.ts

Not run / currently blocked:

  • pnpm -F @proj-airi/stage-ui typecheck
    • the workspace currently has unrelated missing dependency and existing type errors outside this change

Notes:

  • the repo pre-commit hook (pnpm nano-staged -> moeru-lint --fix) hung locally for this staged set, so the commit was created with SKIP_SIMPLE_GIT_HOOKS=1
  • existing store-level volcengine entries in this repo are for speech/TTS, while this PR adds ARK chat providers

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for Ark-based AI providers, including Volcengine Coding Plan, BytePlus, and BytePlus Coding Plan. It implements a shared utility for creating these provider definitions, handles model ID prefix stripping, and enhances the OpenAI-compatible validator to support model ID normalization. The review feedback suggests improving the Zod schema definitions in the shared Ark utility by removing non-descriptive error messages in favor of default or more meaningful ones.

Comment on lines +11 to +14
apiKey: z
.string('API Key'),
baseUrl: z
.string('Base URL'),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The string argument passed to z.string() in Zod defines the custom error message for type mismatches (e.g., if the value is not a string). Using "API Key" or "Base URL" as an error message is not very helpful for users. Since localized labels and descriptions are already provided via .meta() in the createProviderConfig method, it is recommended to use the default Zod error messages or provide more descriptive validation error messages.

Suggested change
apiKey: z
.string('API Key'),
baseUrl: z
.string('Base URL'),
apiKey: z
.string(),
baseUrl: z
.string(),

@lietblue lietblue added feature Related to feature scope/i18n scope/providers Scope related to providers we support labels Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Related to feature scope/i18n scope/providers Scope related to providers we support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants