Skip to content

feat(provider): 支持完整请求 URL - #433

Merged
su-fen merged 1 commit into
Stack-Cairn:mainfrom
yovinchen:feat/provider-full-url
Aug 12, 2026
Merged

feat(provider): 支持完整请求 URL#433
su-fen merged 1 commit into
Stack-Cairn:mainfrom
yovinchen:feat/provider-full-url

Conversation

@yovinchen

Copy link
Copy Markdown
Contributor

变更内容

  • 为供应商 Base URL 增加“完整 URL”开关;开启后请求直接访问配置的完整地址,不再拼接协议接口路径。
  • 为 Claude、Codex 和 xAI 增加可选的模型列表 URL 覆盖,并保留查询参数;Gemini 继续使用原有自动模型发现逻辑。
  • 同步支持 Desktop、Gateway WebUI、运行时配置、Gateway 协议以及 CCS 配置导入。
  • 增加 URL 校验、跨源保护、查询参数合并和对应回归测试。

问题原因

部分供应商使用非标准的完整请求地址。此前运行时始终基于 Base URL 拼接固定接口路径,导致这类供应商无法正常访问;模型列表请求也只能从 Base URL 自动推导。

兼容性与影响

  • 完整 URL 开关默认关闭,现有供应商配置和请求行为保持不变。
  • 模型列表 URL 留空时继续自动推导。
  • 自定义模型列表 URL 只影响模型发现,不影响聊天请求。
  • Gemini 不显示、不保存也不转发模型列表 URL 覆盖。

验证

  • GUI 前端测试:通过
  • Rust 单元测试:682 passed
  • Gateway WebUI 测试:553 passed
  • Gateway Go 测试:全部通过
  • GUI 与 Gateway WebUI 生产构建:通过
  • Biome lint、cargo fmt、Buf lint、git diff check:通过

Fixes #428

支持供应商完整 Base URL 模式,并为非 Gemini 供应商提供模型列表 URL 覆盖。

Fixes Stack-Cairn#428
@yovinchen
yovinchen marked this pull request as ready for review August 12, 2026 08:04
@StackCairn
StackCairn marked this pull request as draft August 12, 2026 08:04
@github-actions

Copy link
Copy Markdown
Contributor

PR governance checks failed — this PR has been converted to draft.

  • UI change without screenshots: this PR modifies frontend code. Please add before/after screenshots or a recording under "Screenshots / preview" in the PR body.

Fix the items above, then click Ready for review to re-run the checks.

@su-fen su-fen added the governance-exempt Skip PR governance checks label Aug 12, 2026
@su-fen
su-fen marked this pull request as ready for review August 12, 2026 11:28
@su-fen
su-fen merged commit 9695065 into Stack-Cairn:main Aug 12, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

governance-exempt Skip PR governance checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 增加供应商 的 Base URL 支持完整地址

2 participants