通过 agentgateway 连接模型服务

官方主路径是 ~/.codex/agentgateway.config.toml 加 [model_providers.agentgateway],wire_api = responses,name 必填。本机 base_url 是 http://localhost:4000/v1。

model_provider = "agentgateway"

[model_providers.agentgateway]
name = "OpenAI via agentgateway"
base_url = "http://localhost:4000/v1"
wire_api = "responses"
env_key = "AGENTGATEWAY_API_KEY"