Add projects
This commit is contained in:
parent
2d3a9ad623
commit
8b607dd700
1802 changed files with 503346 additions and 2 deletions
22
backend/sdk/api/handlers/openai/codex_client_models.go
Normal file
22
backend/sdk/api/handlers/openai/codex_client_models.go
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package openai
|
||||
|
||||
import (
|
||||
codexmodels "github.com/router-for-me/CLIProxyAPI/v7/internal/client/codex/models"
|
||||
"github.com/router-for-me/CLIProxyAPI/v7/internal/registry"
|
||||
)
|
||||
|
||||
func (h *OpenAIAPIHandler) codexClientModelsResponse() map[string]any {
|
||||
optimizeMultiAgentV2 := h != nil && h.Cfg != nil && h.Cfg.CodexOptimizeMultiAgentV2
|
||||
return codexmodels.BuildResponse(h.Models(), registry.GetGlobalRegistry().GetModelProviders, optimizeMultiAgentV2)
|
||||
}
|
||||
|
||||
// CodexClientModelsResponse builds a Codex client model response.
|
||||
func CodexClientModelsResponse(models []map[string]any) map[string]any {
|
||||
return codexmodels.BuildResponse(models, nil, false)
|
||||
}
|
||||
|
||||
// CodexClientModelsResponseWithMultiAgentV2 builds a Codex client model response
|
||||
// and advertises multi-agent v2 for synthesized models when enabled.
|
||||
func CodexClientModelsResponseWithMultiAgentV2(models []map[string]any, enabled bool) map[string]any {
|
||||
return codexmodels.BuildResponse(models, nil, enabled)
|
||||
}
|
||||
Loading…
Reference in a new issue