Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/providers/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,18 @@ export const PROVIDER_REGISTRY: readonly ProviderRegistryEntry[] = [
preserveReasoningContentModels: ["deepseek/deepseek-v4-pro"],
note: "OpenAI-compatible adaptive router. Default is a tool-capable model; orcarouter/auto (adaptive routing) is also selectable. Full catalog: https://www.orcarouter.ai/models",
},
{
// BizRouter: Korean enterprise LLM gateway (api.bizrouter.ai). Model ids are
// vendor-namespaced (`<vendor>/<model>`) and pass through to the upstream as-is.
// Live-verified 2026-07-24: /v1/chat/completions accepts the `tools` field and
// streams, and GET /v1/models returns the per-API-key allowed catalog in the
// OpenAI list shape, so live model discovery narrows to what the key can use.
id: "bizrouter", label: "BizRouter", adapter: "openai-chat", baseUrl: "https://api.bizrouter.ai/v1",
authKind: "key", dashboardUrl: "https://bizrouter.ai/settings/keys",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require security review for BizRouter key auth

This new preset participates in the API-key login path (authKind: "key" with a key dashboard), so it expands where opencodex collects, validates, stores, and forwards user credentials. Please make sure this change is explicitly routed through the repository's security review before merge, rather than treating it as a registry-only data addition.

AGENTS.md reference: AGENTS.md:L65-L69

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require security review for BizRouter key auth

This new preset participates in the API-key login path (authKind: "key" with a key dashboard), so it expands where opencodex collects, validates, stores, and forwards user credentials. Please make sure this change is explicitly routed through the repository's security review before merge, rather than treating it as a registry-only data addition.

Useful? React with 👍 / 👎.

defaultModel: "openai/gpt-5.6-sol",
models: ["openai/gpt-5.6-sol", "anthropic/claude-sonnet-5", "google/gemini-3.5-flash"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve context metadata for seeded BizRouter models

When BizRouter live discovery is unavailable or returns only model ids, these seeded rows have no modelContextWindows/modelMaxInputTokens, so the routed catalog falls back to the generic 128k context window in ensureStrictCatalogFields; that makes Codex compact/truncate far below the advertised capacity for models like openai/gpt-5.6-sol and anthropic/claude-sonnet-5. Please copy the known context metadata for the static fallback entries, as the OpenRouter preset does for the same namespaced models.

Useful? React with 👍 / 👎.

note: "Korean enterprise LLM gateway. Per-key allowed models are discovered live from /v1/models. Full catalog: https://bizrouter.ai/models",
},
{ id: "groq", label: "Groq", adapter: "openai-chat", baseUrl: "https://api.groq.com/openai/v1", authKind: "key", featured: true, dashboardUrl: "https://console.groq.com/keys" },
// 2026-07-10 Gemini API refresh: Tier-2 ai.google.dev evidence recorded in
// devlog/_plan/260710_provider_hardening/001_research_frontier.md.
Expand Down
2 changes: 1 addition & 1 deletion tests/provider-registry-parity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function nativeTemplate(): Record<string, unknown> {
}

const EXPECTED_KEY_PROVIDER_IDS = [
"anthropic-apikey", "openai-apikey", "umans", "opencode-go", "neuralwatt", "openrouter", "orcarouter", "groq", "google", "google-vertex", "azure-openai",
"anthropic-apikey", "openai-apikey", "umans", "opencode-go", "neuralwatt", "openrouter", "orcarouter", "bizrouter", "groq", "google", "google-vertex", "azure-openai",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Add a focused BizRouter registry regression test.

The parity list only checks that "bizrouter" exists in the expected order. It would still pass if the entry had an incorrect adapter, URL, auth kind, default model, model allowlist, or missing live-discovery flag. Add a focused Bun test asserting the complete BizRouter configuration and its /v1/models behavior contract.

As per path instructions, a behavior change in src/** must come with a focused regression test near the existing subsystem tests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/provider-registry-parity.test.ts` at line 32, Add a focused Bun
regression test in the existing provider registry tests for the "bizrouter"
entry, asserting its adapter, URL, authentication kind, default model, model
allowlist, and live-discovery setting. Also verify that its models endpoint uses
the expected "/v1/models" behavior, while keeping the existing parity-order test
unchanged.

Source: Path instructions

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add focused BizRouter registry coverage

Adding only bizrouter to EXPECTED_KEY_PROVIDER_IDS verifies the catalog count/order but does not protect the new preset's behavior: a typo in the base URL, dashboard URL, default model, or slash-model routing seed would still pass this parity test. Please add a focused assertion near this registry suite that checks the BizRouter projection fields and at least one encoded routed slug/default model path.

Useful? React with 👍 / 👎.

"deepseek", "cerebras", "together", "fireworks", "firepass", "moonshot",
"huggingface", "nvidia", "venice", "zai", "nanogpt", "synthetic", "siliconflow", "qwen-cloud", "tencent-coding-plan",
"qianfan", "alibaba", "alibaba-token-plan", "alibaba-token-plan-intl", "parallel", "zenmux", "litellm", "ollama-cloud", "mistral",
Expand Down
Loading