Remove LLM_MODEL from .env.example; add vendor-level base URL fallback for per-model-URL providers#17
Merged
tangshixiang merged 2 commits intomainfrom Mar 16, 2026
Conversation
…k for per-model-URL providers Co-authored-by: tangshixiang <15044508+tangshixiang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove LLM_MODEL from .env.example and add fallback URL
Remove LLM_MODEL from .env.example; add vendor-level base URL fallback for per-model-URL providers
Mar 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR streamlines AI provider configuration by removing the redundant LLM_MODEL example from .env.example and adding a vendor-level *_BASE_URL fallback for “per-model base URL” providers (Qwen/Moonshot/DeepSeek/MiniMax/Zhipu/SH-Lab), aligning their behavior with the rest of the provider ecosystem.
Changes:
- Removed
LLM_MODELfrom.env.exampleand documented vendor-level*_BASE_URLvariables with optional per-model overrides. - Updated
getPerModelProvider()to resolve base URL via per-model env var → vendor-level env var → explicit error listing both. - Added unit tests verifying priority/fallback/error behavior across all per-model-URL providers, and expanded env var documentation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/lib/ai/provider.ts |
Implements vendor-level base URL fallback and clearer error messaging for per-model-URL providers. |
src/lib/ai/provider.test.ts |
Adds Vitest coverage for per-model vs vendor base URL resolution and error messaging. |
docs/getting-started/environment-variables.md |
Documents missing provider API keys and vendor-level base URL variables. |
.env.example |
Removes LLM_MODEL example and adds vendor-level base URL examples + per-model override notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
LLM_MODELin.env.exampleis redundant (default is in code, overridable via Settings UI). Per-model-URL providers (Qwen, Moonshot, DeepSeek, etc.) only support per-model env vars likeMOONSHOT_KIMI_K2_5_BASE_URLwith no vendor-level fallback, which doesn't match common practice.Changes
.env.example: RemoveLLM_MODELline. Add vendor-level base URL examples (QWEN_BASE_URL,MOONSHOT_BASE_URL, etc.) with per-model URLs documented as optional overrides.src/lib/ai/provider.ts:getPerModelProvider()now resolves base URL with fallback:MOONSHOT_KIMI_K2_5_BASE_URL)MOONSHOT_BASE_URL)docs/getting-started/environment-variables.md: Add missing provider API keys and vendor-level base URL variables to the reference table.src/lib/ai/provider.test.ts: 5 unit tests covering priority, fallback, error messages, and all 6 providers.Resolution logic
Setting
MOONSHOT_BASE_URLonce now works for all Moonshot models. Per-model URLs still take priority for advanced routing.Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.