mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-08-18 03:57:06 +08:00
feat(model-adapter): add remote model selection
- Fetch and normalize OpenAI and Anthropic model lists through the proxy service. - Add searchable multi-model selection with localized UI and persisted adapter mappings. - Cover endpoint resolution, authentication, pagination, and response parsing. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -24,6 +24,12 @@ type ModelAdapterTestResult = client.ModelAdapterTestResult
|
||||
// ModelAdapterTestResultsPayload 定义测速结果事件载荷。
|
||||
type ModelAdapterTestResultsPayload = client.ModelAdapterTestResultsPayload
|
||||
|
||||
// ModelAdapterModelsRequest 定义模型列表查询请求。
|
||||
type ModelAdapterModelsRequest = client.ModelAdapterModelsRequest
|
||||
|
||||
// ModelAdapterModelsResult 定义模型列表查询结果。
|
||||
type ModelAdapterModelsResult = client.ModelAdapterModelsResult
|
||||
|
||||
// CursorAccountStatus 是可安全展示给桌面前端的独立 Cursor 账号状态。
|
||||
type CursorAccountStatus = client.CursorAccountStatus
|
||||
|
||||
@@ -119,6 +125,11 @@ func (s *ProxyService) GetModelAdapterTestResults() []ModelAdapterTestResult {
|
||||
return s.core.GetModelAdapterTestResults()
|
||||
}
|
||||
|
||||
// FetchModelAdapterModels 用于从模型服务读取可用模型列表。
|
||||
func (s *ProxyService) FetchModelAdapterModels(input ModelAdapterModelsRequest) (ModelAdapterModelsResult, error) {
|
||||
return s.core.FetchModelAdapterModels(input)
|
||||
}
|
||||
|
||||
// GetDeviceID 用于处理与 GetDeviceID 相关的逻辑。
|
||||
func (s *ProxyService) GetDeviceID() (string, error) {
|
||||
return s.core.GetDeviceID()
|
||||
|
||||
Reference in New Issue
Block a user