返回 Skill 列表
extension
分类: 其它需要 API Key

OneHop codex config

简要说明 这个 skill 是用来帮你管理 第三方例如OneHop 的模型在codex配置,适合不想手动改配置文件的用户。 第一步先做什么 先把你的 baseurl 和 api-key 发到聊天里。 示例: baseurl https://api.onehop.ai/v1 api-key 你的密钥 有了这两个信息之后,skill 才能读取模型、同步配置、检查当前模型状态。 然后怎么用 你再在聊天里输入下面几种用法: list:查看BaseURL的可用模型和本地配置 sync:同步模型配置到本地,同时会备份您的现在在用的Codex的配置文件 switch 模型名:切换到指定模型 status:查看当前模型是否正常工作 推荐顺序:先发 baseurl 和 api-key,然后 list -> sync -> switch 模型名 -> status

person作者: user_28f82beahubcommunity

OneHop Codex Config

中文简要说明

这是一个用来管理 OneHop 模型配置的小工具,不需要手动改文件,也不需要记命令。

怎么开始用

第一步,先把你的 OneHop 地址和密钥发到聊天里。

格式可以直接这样写:

baseurl https://api.onehop.ai/v1
api-key 你的密钥

或者这样写也可以:

https://api.onehop.ai/v1 你的密钥

只有先提供 baseurlapi-key,这个 skill 才能去读取模型列表、同步配置、检测当前模型状态。

第二步,再告诉它你要做什么。

你可以在聊天里直接说:

  • list:看看 OneHop 支持哪些模型,也看看本地已经保存了哪些模型配置
  • sync:把 OneHop 支持的模型同步到本地,每个模型生成一个配置文件,并自动备份当前默认配置
  • switch 模型名:切换到你想用的模型
  • status:查看当前正在使用哪个模型,并做一次真实连通测试

如果你是第一次用,可以按这个顺序:

  1. 先发送 baseurlapi-key
  2. 再用 list 看模型
  3. 然后用 sync 同步配置
  4. 再用 switch 模型名 切换模型
  5. 最后用 status 检查是否生效

一个完整例子:

baseurl https://api.onehop.ai/v1
api-key xxxxx
list
sync
switch openai/gpt-5.5
status

整个过程都可以直接在聊天窗口里完成。

Use this skill when the user wants to manage OneHop-backed Codex model configs without manually editing files or running commands.

All operations must be performed interactively in the chat window. Do not ask the user to run shell commands or invoke scripts manually.

Chat modes

  1. list Behavior:

    • Probe {base_url}/models
    • Filter models that support openai_responses and text output
    • Show the compatible remote model list in chat
    • Show the local saved config files under ~/.codex/onehop/
  2. sync Behavior:

    • Probe {base_url}/models
    • Filter compatible models
    • Generate one config file per compatible model under ~/.codex/onehop/<model-slug>.config.toml
    • Back up the current default config ~/.codex/config.toml into ~/.codex/onehop/backup-config-MM-DD-HH-MM-SS-ffffff.toml
    • Report which files were created
  3. switch Behavior:

    • Find the saved config matching the requested model name
    • Back up the current default config to ~/.codex/onehop/backup-config-MM-DD-HH-MM-SS-ffffff.toml
    • Copy the requested model config to ~/.codex/config.toml
    • Confirm which model is now active
  4. status Behavior:

    • Read the current default config ~/.codex/config.toml
    • Show the current model, provider, and configured base URL
    • Run one live question against the current model using the provided base_url and api_key
    • Report the response as a real connectivity and model-use check

Natural triggers

  • If the user asks to “列出模型” or says list, use list
  • If the user asks to “同步配置” or says sync, use sync
  • If the user directly gives a model name, treat that as switch
  • If the user asks “现在在用什么模型” or says status, use status

Default policy

  • Prefer minimax/minimax-m3
  • If minimax/minimax-m3 is unavailable, fall back to openai/gpt-5.4
  • If neither exists, choose the first model that supports openai_responses and text output
  • Set model_reasoning_effort = "high"

File layout

  • Default Codex config: ~/.codex/config.toml
  • Managed OneHop model configs: ~/.codex/onehop/<model-slug>.config.toml
  • Default-config backups: ~/.codex/onehop/backup-config-MM-DD-HH-MM-SS-ffffff.toml

Internal implementation

The bundled Python script is only an internal implementation detail:

$CODEX_HOME/skills/onehop-codex-config/scripts/generate_onehop_codex_config.py

If CODEX_HOME is unavailable:

~/.codex/skills/onehop-codex-config/scripts/generate_onehop_codex_config.py

The user must never be told to run this script directly.

Output template

Generated config content should look like:

model_provider = "OneHop-MM-DD-HH-MM-SS-ffffff"
model = "<selected_model>"
model_reasoning_effort = "high"
disable_response_storage = true

[model_providers."OneHop-MM-DD-HH-MM-SS-ffffff"]
name = "OneHop"
base_url = "<base_url>"
wire_api = "responses"
requires_openai_auth = true
experimental_bearer_token = "<api_key>"

Notes

  • Do not invent model support. Probe /models.
  • For list, show both remote-compatible models and local-saved configs.
  • For sync, generate one local config per compatible model unless the user asks for a subset.
  • For switch, overwrite only ~/.codex/config.toml, and always back it up first.
  • For status, include a real live model test, so status also covers the old “check” behavior.
  • Managed config filenames must use sanitized model slugs, for example openai-gpt-5-4.config.toml.
  • Keep the config content timestamped inside the file by using model_provider = "OneHop-MM-DD-HH-MM-SS-ffffff".