-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.codex.example.yml
More file actions
85 lines (76 loc) · 3.29 KB
/
config.codex.example.yml
File metadata and controls
85 lines (76 loc) · 3.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Perspicacité — OpenAI Codex CLI subscription preset
#
# Routes every internal LLM call through OpenAI's `codex` CLI as a
# subprocess. Your ChatGPT Plus/Pro/Team subscription (the one bundled
# with Codex CLI access) pays for inference; no OPENAI_API_KEY needed
# in this config.
#
# **Verified against codex-cli 0.130.0** (run `codex --version` to
# check yours). If your version differs, run `codex exec --help` and
# adjust the flags below.
#
# **Prerequisites:**
# 1. Install Codex CLI: `npm install -g @openai/codex`
# 2. Sign in: `codex login` (browser-based ChatGPT auth)
# 3. Verify: `echo "say hi" | codex exec --skip-git-repo-check`
# 4. Use this file as your config:
# perspicacite -c config.codex.example.yml serve
#
# **Caveat — Codex is an agent, not a pure completion endpoint.**
# Each call spins up Codex's full session machinery (sandbox, tool
# loop, memory). Per-call latency is ~5–15 s even for tiny prompts
# (we measured ~9 s for a trivial JSON response). For heavy
# multi-paper ingests, expect minutes-to-hours and shared rate limits
# with your interactive Codex session.
#
# Same general caveats as the other agent-CLI presets: no prompt
# caching, no per-call temperature/max_tokens, no streaming.
llm:
default_provider: "agent_cli"
default_model: "gpt-5.5" # whatever your Codex subscription supports
# Use the same provider for every stage; Codex doesn't expose
# discrete "cheap" model tiers via the CLI today.
providers_per_stage:
routing: "agent_cli"
screening: "agent_cli"
rephrase: "agent_cli"
contextual: "agent_cli"
synthesis_basic: "agent_cli"
synthesis_heavy: "agent_cli"
providers:
agent_cli:
base_url: ""
executable: "codex"
timeout: 300 # Codex is slow per call — give it room
max_retries: 1
# Codex's `exec` subcommand is the non-interactive entry point.
# `--skip-git-repo-check` lets it run outside a git repo.
# `--sandbox read-only` prevents any model-generated shell
# commands from touching disk (we just want a completion).
# `--ephemeral` skips persisting session files for each call.
extra_args:
- "exec"
- "--skip-git-repo-check"
- "--sandbox"
- "read-only"
- "--ephemeral"
# Codex reads the prompt from stdin when the positional arg is
# omitted. Stdin is cleaner than passing the prompt as a CLI
# arg (avoids shell quoting hazards on long prompts).
prompt_via: "stdin"
# No `--system` flag in Codex 0.130. The system prompt gets
# prepended to the body inside _flatten_messages.
system_flag: null
# Model selection: `codex exec --model <NAME>`. Set
# `default_model` above (or in per-stage `models`) to whatever
# your Codex account supports — `gpt-5.5`, `gpt-5`, `o4-mini`,
# etc. Run `codex` interactively once to see your options.
model_flag: "--model"
# Cleanest extraction: `--output-last-message <FILE>` writes
# ONLY the final assistant text to a tempfile. Avoids parsing
# Codex's banner / token-counter / session-id stdout.
output_file_flag: "--output-last-message"
output_format: "text"
result_json_path: null
model_aliases: {}
env_extra: {}