Skip to content

[Upstream] feat: add Alibaba Bailian and Coding Plan channels#119

Open
Sagit-chu wants to merge 2 commits into
mainfrom
upstream-pr-2371
Open

[Upstream] feat: add Alibaba Bailian and Coding Plan channels#119
Sagit-chu wants to merge 2 commits into
mainfrom
upstream-pr-2371

Conversation

@Sagit-chu

Copy link
Copy Markdown
Owner

Synced from upstream PR: songquanpeng#2371

Summary

  • add a dedicated AliBailianCodingPlan channel type for DashScope Coding Plan chat completions
  • extend Alibaba Bailian model presets and OpenAI-compatible channel metadata
  • expose Alibaba Bailian and Coding Plan options in the default, air, and berry themes
  • refresh channel caches immediately after channel create, update, delete, and status changes so newly configured channels are routable without waiting for the periodic sync loop
  • invalidate cached per-group model lists after channel changes so /v1/models stays consistent with request routing
  • serialize frontend theme builds in the Docker image build to avoid concurrent build/ directory conflicts
  • document Bailian / Coding Plan setup and channel cache refresh behavior in the Chinese and English READMEs and changelog

Notes

  • Alibaba Bailian Coding Plan is intentionally limited to chat/completions
  • embeddings remain unsupported for Coding Plan
  • the README notes Alibaba Cloud's documented usage constraint for Coding Plan interactive coding scenarios
  • the cache refresh fix is targeted at Redis-backed deployments where memory channel caching is enabled through the existing startup flow

Root Cause

Channel mutations updated the database and abilities table, but Redis-backed deployments also keep an in-memory channel selection cache that only refreshed on the periodic sync loop. In that window, /v1/models could show the new model list while request routing still used stale channel state and returned no available channels.

Testing

  • env -u GOROOT -u GOPATH -u GOTOOLDIR /opt/homebrew/bin/go test ./relay/adaptor/openai -run 'TestAliBailianCodingPlan'
  • env -u GOROOT -u GOPATH -u GOTOOLDIR CGO_ENABLED=1 /opt/homebrew/bin/go test ./model ./controller/...
  • git diff --check

xyezir added 2 commits April 9, 2026 00:45
Added:\n- add a dedicated AliBailianCodingPlan adaptor and channel type\n- add Bailian and Coding Plan model presets plus regression coverage\n\nChanged:\n- expose Bailian and Coding Plan options in default, air, and berry themes\n- distinguish Bailian and Coding Plan key prompts in channel forms\n- fix the duplicated Replicate channel key in the berry theme\n\nDocs:\n- add a top-level CHANGELOG entry for the new channels\n- document Bailian and Coding Plan setup in the Chinese and English READMEs\n\nTests:\n- go test ./relay/adaptor/openai -run 'TestAliBailianCodingPlan'\n- go test ./relay/... ./controller/...
- refresh in-memory channel selection state after channel create, update, delete, and status changes
- invalidate cached per-group model lists so model discovery and routing stay consistent
- add regression coverage for channel cache refresh behavior
- serialize frontend theme builds in the Docker image to avoid concurrent build directory conflicts
- document the cache refresh behavior in changelog and FAQ
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.

2 participants