codex通过cpa的反代api使用方法

分享一下我使用cpa反代的经验 下载cpa之后,找到cpa的config.yaml,打开复制这段话: host: “127.0.0.1” port: 8317 auth-dir: “你的cpa安装地址”/auth” api-keys: “你的api key” debug: true routing:...
codex通过cpa的反代api使用方法
codex通过cpa的反代api使用方法

分享一下我使用cpa反代的经验
下载cpa之后,找到cpa的config.yaml,打开复制这段话:
host: “127.0.0.1”
port: 8317
auth-dir: “你的cpa安装地址”/auth”
api-keys:

  • “你的api key”
    debug: true
    routing:
    strategy: “round-robin”
    quota-exceeded:
    switch-project: true
    switch-preview-model: false
    request-retry: 3
    max-retry-credentials: 0
    max-retry-interval: 30
    remote-management:
    allow-remote: true
    secret-key: “管理页面密码”
    disable-control-panel: false
    disable-auto-update-panel: true

保存之后,然后打开codex的config.toml文件(一般在你C 盘的用户的.codex下):
model = “gpt-5.4”
model_reasoning_effort = “xhigh”
personality = “pragmatic”
model_context_window = 400000
model_auto_compact_token_limit = 400000
model_provider = “cpa_local”
approvals_reviewer = “guardian_subagent”

[features]
remote_connections = true
multi_agent = true

[model_providers.cpa_local]
name = “Local CLIProxyAPI”
base_url = “http://127.0.0.1:8317/v1
experimental_bearer_token = “API KEY”
wire_api = “responses”

整体的配置完成之后运行cli-proxy-api,然后打开codex。基本就可以了。已经打开了的退出后台重进就行。

2 个帖子 - 2 位参与者

阅读完整话题

来源: LinuxDo 最新话题查看原文