Skip to content

Add Alibaba coding-plan provider#201

Open
rpx99 wants to merge 1 commit intocharmbracelet:mainfrom
rpx99:feat/alibaba-provider-200
Open

Add Alibaba coding-plan provider#201
rpx99 wants to merge 1 commit intocharmbracelet:mainfrom
rpx99:feat/alibaba-provider-200

Conversation

@rpx99
Copy link

@rpx99 rpx99 commented Mar 3, 2026

Adds a new Alibaba provider config and registers it in the provider registry:

  • add internal/providers/configs/alibaba.json
  • register provider embed+factory in internal/providers/providers.go
  • add InferenceProviderAlibaba to known providers

Refs #200

  • I have read CONTRIBUTING.md.
  • I have created a discussion that was approved by a maintainer (for new features).

Adds a new Alibaba provider config and registers it in the provider registry.\n\n- add internal/providers/configs/alibaba.json\n- register provider embed+factory in internal/providers/providers.go\n- add InferenceProviderAlibaba to known providers\n\nRefs charmbracelet#200
@rpx99 rpx99 requested a review from a team as a code owner March 3, 2026 11:07
@rpx99 rpx99 requested review from meowgorithm and raphamorim and removed request for a team March 3, 2026 11:07
andreynering added a commit to charmbracelet/crush that referenced this pull request Mar 4, 2026
Copy link
Member

@andreynering andreynering left a comment

Choose a reason for hiding this comment

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

Hi @rpx99, thanks for contributing!

I had to do a small change on Crush to be able to enter the API key and proceed:

You can use that branch to test as well.

I also made a few comments below.

"id": "alibaba",
"type": "openai-compat",
"api_key": "$ALIBABA_API_KEY",
"api_endpoint": "https://coding-intl.dashscope.aliyuncs.com/v1",
Copy link
Member

Choose a reason for hiding this comment

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

We're using the international endpoint here (-intl. suffix).

I noticed that for non-coding plan we supposedly have different endpoints depending on location:

Image

But for the Coding Plan their docs seems to always suggest -intl.?

Given so, it's probably fine to keep as is, I think. I just ask you to confirm it's working for you. For me, it's working fine!

Choose a reason for hiding this comment

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

I think maybe it should be like the MiniMax situation, we should have all these file:

  • alibaba.json (who use international version -intl)
  • alibaba-us.json
  • alibaba-china.json

I've been using the China version for days by editing my crush.json, it would be cool if it is builtin.

@@ -0,0 +1,163 @@
{
"name": "Alibaba Coding Plan",
"id": "alibaba",
Copy link
Member

Choose a reason for hiding this comment

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

As the endpoint seems to be specific to the coding plan, it's probably a good idea to reflect that in the ID:

Suggested change
"id": "alibaba",
"id": "alibaba-coding",

InferenceProviderMiniMax InferenceProvider = "minimax"
InferenceProviderMiniMaxChina InferenceProvider = "minimax-china"
InferenceProviderIoNet InferenceProvider = "ionet"
InferenceProviderAlibaba InferenceProvider = "alibaba"
Copy link
Member

Choose a reason for hiding this comment

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

This also applies to the code. Let's do some renaming:

  • InferenceProviderAlibaba -> InferenceProviderAlibabaCoding
  • alibabaConfig -> alibabaCodingConfig
  • alibabaProvider -> alibabaCodingProvider
  • alibaba.json -> alibaba-coding.json

},
{
"id": "qwen3-max-2026-01-23",
"name": "Qwen3 Max 2026-01-23 (Coding Plan)",
Copy link
Member

Choose a reason for hiding this comment

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

All models seems to work for me with the Coding Plan, so no need to add this suffix? Unless I'm missing anything, let's remove from all:

Suggested change
"name": "Qwen3 Max 2026-01-23 (Coding Plan)",
"name": "Qwen3 Max 2026-01-23",

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.

4 participants