Skip to content

feat(byok): add Alibaba Token Plan provider#4284

Open
chrarnoldus wants to merge 2 commits into
mainfrom
feat/alibaba-token-plan
Open

feat(byok): add Alibaba Token Plan provider#4284
chrarnoldus wants to merge 2 commits into
mainfrom
feat/alibaba-token-plan

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • Add Alibaba Token Plan as a direct BYOK provider using its OpenAI-compatible Singapore endpoint.
  • Sync Alibaba's model catalog from models.dev, with Qwen3.7 Plus metadata as the resilient fallback.
  • Exclude non-text-output models from models.dev-backed chat catalogs so image-generation models are not advertised as chat models.

Verification

  • Not manually tested because an Alibaba Token Plan API key is not available in this environment.

Visual Changes

N/A

Reviewer Notes

The provider follows the existing Xiaomi Token Plan direct-BYOK pattern. Runtime model metadata comes from the alibaba-token-plan entry in models.dev.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus self-assigned this Jun 26, 2026
Comment thread apps/web/src/lib/notifications.ts Outdated
'zhipuai-coding-plan': 'GLM Coding Plan',

// Alibaba
'alibaba-token-plan': 'Alibaba Token Plan',

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.

WARNING: This mapping misses the existing Alibaba provider ID

generateByokProvidersNotification() is matching the extension's apiProvider values from notification_byok_providers_jan_19, but the established Alibaba provider ID elsewhere in the app is alibaba and Qwen models normalize into that provider. Adding only alibaba-token-plan means existing Alibaba users will not match this lookup, so the new BYOK notification will never reach the users it is meant to target.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • apps/web/src/lib/ai-gateway/providers/direct-byok/direct-byok-meta.ts
  • apps/web/src/lib/notifications.ts
Previous Review Summary (commit 1b78998)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 1b78998)

Status: 1 Issue Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/web/src/lib/notifications.ts 344 Alibaba BYOK notification mapping only matches the new direct-plan ID, so existing Alibaba users will not receive the rollout notification.
Files Reviewed (7 files)
  • apps/web/src/lib/ai-gateway/providers/direct-byok/alibaba-token-plan.ts - 0 issues
  • apps/web/src/lib/ai-gateway/providers/direct-byok/direct-byok-definitions.ts - 0 issues
  • apps/web/src/lib/ai-gateway/providers/direct-byok/direct-byok-meta.ts - 0 issues
  • apps/web/src/lib/ai-gateway/providers/direct-byok/sync-direct-byok.test.ts - 0 issues
  • apps/web/src/lib/ai-gateway/providers/direct-byok/sync-direct-byok.ts - 0 issues
  • apps/web/src/lib/ai-gateway/providers/openrouter/inference-provider-id.ts - 0 issues
  • apps/web/src/lib/notifications.ts - 1 issue

Reviewed by gpt-5.4-2026-03-05 · Input: 78.1K · Output: 17.3K · Cached: 402.6K

Review guidance: REVIEW.md from base branch main

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant