MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / codexPostWrite

Function codexPostWrite

internal/tools/codex_postwrite.go:16–28  ·  view source on GitHub ↗

codexPostWrite runs after the generic Apply for the openai-codex tool. If the selected model starts with "gpt", it sets [model_providers. ] wire_api = "responses" Otherwise it unsets wire_api on that provider. No-op for other tools.

(tool Tool, endpointName, model, configPath string)

Source from the content-addressed store, hash-verified

14//
15// Otherwise it unsets wire_api on that provider. No-op for other tools.
16func codexPostWrite(tool Tool, endpointName, model, configPath string) error {
17 if tool.Name != "openai-codex" {
18 return nil
19 }
20 path := configPath
21 if path == "" && tool.ConfigTarget != nil {
22 path = pathutil.Expand(tool.ConfigTarget.Path)
23 }
24 if path == "" || endpointName == "" {
25 return nil
26 }
27 return applyCodexWireAPI(path, endpointName, model)
28}
29
30func applyCodexWireAPI(path, endpointName, model string) error {
31 data, err := readConfigFile(path, "toml")

Callers 2

WriteConfigFunction · 0.85

Calls 2

ExpandFunction · 0.92
applyCodexWireAPIFunction · 0.85

Tested by 1