fix(provider): Alibaba Token Plan provider - #3787
Merged
Merged
Conversation
Adds support for Alibaba Cloud Model Studio Token Plan (https://models.dev/providers/alibaba-token-plan/), an OpenAI-compatible endpoint at token-plan.ap-southeast-1.maas.aliyuncs.com. Models are hardcoded in provider.json (mirroring opencode's alibaba-token-plan provider) since the endpoint does not expose capability metadata. Co-Authored-By: ForgeCode <noreply@forgecode.dev>
Adds the flex-tier variants (glm-5.2-flex, glm-5.2-short-flex, glm-5.2-short-fast-flex, kimi-k2.6-flex, kimi-k2.7-code-flex) and the missing Kimi K2.5 / K2.5 Fast models to the Neuralwatt provider, matching the model list available on opencode. Co-Authored-By: ForgeCode <noreply@forgecode.dev>
I have tested this branch with my own API key, and it is working, I only tested it with Qwen 3.8 Preview model though... |
ssddOnTop
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Alibaba Token Plan
Adds support for the Alibaba Token Plan provider (models.dev/providers/alibaba-token-plan), mirroring how opencode supports it.
https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1ALIBABA_TOKEN_PLAN_API_KEY(same env var as opencode)ProviderId::ALIBABA_TOKEN_PLANbuilt-in constant with FromStr roundtrip supportprovider.json(endpoint does not expose capability metadata), covering the text/chat models: Qwen3.8 Max Preview, Qwen3.7 Max/Plus, Qwen3.6 Plus/Flash, DeepSeek V4 Pro/Flash, DeepSeek V3.2, Kimi K2.5/2.6/2.7 Code, GLM-5/5.1/5.2, MiniMax-M2.5 (image/video generation models excluded)Neuralwatt missing models
Fixes missing Neuralwatt models reported by a user ("what happened to flex models from neuralwatt? they have em on opencode"):
glm-5.2-flex,glm-5.2-short-flex,glm-5.2-short-fast-flex,kimi-k2.6-flex,kimi-k2.7-code-flexkimi-k2.5andkimi-k2.5-fast, which were missing entirelyTest plan
test_alibaba_token_plan_configinprovider_repo.rstest_neuralwatt_configto assert flex models are presentforge_domain/src/provider.rscargo test -p forge_domain -p forge_repoprovider tests pass; provider.json validated as JSONCo-Authored-By: ForgeCode noreply@forgecode.dev