Skip to content

fix: 修复Windows端自定义AI端点测试连接和获取模型的CORS跨域问题#97

Open
zsxink wants to merge 1 commit into
codedogQBY:mainfrom
zsxink:main
Open

fix: 修复Windows端自定义AI端点测试连接和获取模型的CORS跨域问题#97
zsxink wants to merge 1 commit into
codedogQBY:mainfrom
zsxink:main

Conversation

@zsxink
Copy link
Copy Markdown

@zsxink zsxink commented May 7, 2026

Summary

  • 导出 getEndpointFetch 函数供外部使用
  • test-endpoint.tssettings-store.ts 中使用跨域适配fetch
  • 与AI对话功能保持一致的请求处理逻辑

Fixes

Test plan

  • Windows端添加自定义AI端点,点击测试连接
  • Windows端获取模型列表
  • Android端相同操作验证兼容性

涉及文件 (3个):

  • packages/core/src/ai/llm-provider.ts - 导出 getEndpointFetch
  • packages/core/src/ai/test-endpoint.ts - 测试连接使用跨域fetch
  • packages/core/src/stores/settings-store.ts - 获取模型使用跨域fetch

- 导出getEndpointFetch函数供外部使用
- test-endpoint和settings-store中使用跨域适配fetch
- 与AI对话功能保持一致的请求处理逻辑
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.

自定义AI端点(Custom OpenAI Compatible)在Windows桌面端无法测试连接和获取模型列表

1 participant