mirror of
https://github.com/cexll/myclaude.git
synced 2026-02-05 02:30:26 +08:00
feat: 支持通过环境变量配置 skills 模型
- 新增 CODEX_MODEL 环境变量覆盖 codex 默认模型 - 新增 GEMINI_MODEL 环境变量覆盖 gemini 默认模型 - 更新文档说明环境变量用法 - 保持向后兼容,未设置环境变量时使用原默认值 修复 #23 Generated by swe-agent
This commit is contained in:
@@ -35,6 +35,13 @@ Resume a session:
|
|||||||
uv run ~/.claude/skills/codex/scripts/codex.py resume <session_id> "<task>" [model] [working_dir]
|
uv run ~/.claude/skills/codex/scripts/codex.py resume <session_id> "<task>" [model] [working_dir]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Environment Variables
|
||||||
|
|
||||||
|
- **CODEX_MODEL**: Override default model (default: `gpt-5.1-codex`)
|
||||||
|
- Example: `export CODEX_MODEL=gpt-5-codex`
|
||||||
|
- **CODEX_TIMEOUT**: Override timeout in milliseconds (default: 7200000 = 2 hours)
|
||||||
|
- Example: `export CODEX_TIMEOUT=3600000` for 1 hour
|
||||||
|
|
||||||
## Timeout Control
|
## Timeout Control
|
||||||
|
|
||||||
- **Built-in**: Script enforces 2-hour timeout by default
|
- **Built-in**: Script enforces 2-hour timeout by default
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import sys
|
|||||||
import os
|
import os
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
DEFAULT_MODEL = 'gpt-5.1-codex'
|
DEFAULT_MODEL = os.environ.get('CODEX_MODEL', 'gpt-5.1-codex')
|
||||||
DEFAULT_WORKDIR = '.'
|
DEFAULT_WORKDIR = '.'
|
||||||
DEFAULT_TIMEOUT = 7200 # 2 hours in seconds
|
DEFAULT_TIMEOUT = 7200 # 2 hours in seconds
|
||||||
FORCE_KILL_DELAY = 5
|
FORCE_KILL_DELAY = 5
|
||||||
|
|||||||
@@ -30,6 +30,13 @@ uv run ~/.claude/skills/gemini/scripts/gemini.py -m <model> -p "<prompt>" [worki
|
|||||||
python3 ~/.claude/skills/gemini/scripts/gemini.py -m <model> -p "<prompt>" [working_dir]
|
python3 ~/.claude/skills/gemini/scripts/gemini.py -m <model> -p "<prompt>" [working_dir]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Environment Variables
|
||||||
|
|
||||||
|
- **GEMINI_MODEL**: Override default model (default: `gemini-3-pro-preview`)
|
||||||
|
- Example: `export GEMINI_MODEL=gemini-3`
|
||||||
|
- **GEMINI_TIMEOUT**: Override timeout in milliseconds (default: 7200000 = 2 hours)
|
||||||
|
- Example: `export GEMINI_TIMEOUT=3600000` for 1 hour
|
||||||
|
|
||||||
## Timeout Control
|
## Timeout Control
|
||||||
|
|
||||||
- **Built-in**: Script enforces 2-hour timeout by default
|
- **Built-in**: Script enforces 2-hour timeout by default
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import sys
|
|||||||
import os
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
DEFAULT_MODEL = 'gemini-3-pro-preview'
|
DEFAULT_MODEL = os.environ.get('GEMINI_MODEL', 'gemini-3-pro-preview')
|
||||||
DEFAULT_WORKDIR = '.'
|
DEFAULT_WORKDIR = '.'
|
||||||
DEFAULT_TIMEOUT = 7200 # 2 hours in seconds
|
DEFAULT_TIMEOUT = 7200 # 2 hours in seconds
|
||||||
FORCE_KILL_DELAY = 5
|
FORCE_KILL_DELAY = 5
|
||||||
|
|||||||
Reference in New Issue
Block a user