You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -120,6 +136,7 @@ LLM settings live in a JSON config file — no environment variables required:
120
136
-`reasoning_effort` is passed to the API as-is (omitted when unset) — whatever your provider accepts ("low"/"medium"/"high").
121
137
- Other optional keys: `backend`, `temperature`, `max_tokens`, `timeout`, `stream` (`true` by default; `run --no-stream` overrides on the command line).
122
138
-`subagent_llm` configures the LLM for Agent-tool requests: every key is optional and unset keys inherit the main `llm`, so a cheaper/smaller model (or a different provider) can serve delegated work.
139
+
-**Named model profiles** (`models` section) enable runtime switching via `/model`: each profile is a partial LLM settings dict; unset keys inherit the main `llm`. Use `/model` in the TUI to switch between providers/models without restarting.
123
140
-`paths.context_path` / `paths.skill_path` override context/skill discovery — defaults are `<project>/contexts` or `~/.emacs.d/contexts` (skills: `<project>/skills` or `~/.emacs.d/skills`).
124
141
-`mcp.servers` configures MCP servers (requires the `[mcp]` extra). Each server is `{transport, command, args, env, url, headers, parallel, timeout, enabled}` — `stdio` needs `command`/`args` (optionally `env` naming environment variables to pass through, e.g. `["GITHUB_TOKEN"]`); `streamable-http`/`sse` need `url` (optionally `headers`). Its tools appear as `mcp__<server>__<tool>`.
125
142
- Precedence: code defaults < config file < `OPENAI_*` env vars (env still wins if set, but nothing is required). Sub-agent settings honor `OPENAI_SUBAGENT_*` (`_BASE_URL`, `_API_KEY`, `_MODEL`, `_BACKEND`).
|`/restore [path\|title\|--latest]`| restore a session (title substring match) |
147
164
|`/clear`| start a fresh conversation |
165
+
|`/model [name]`| switch LLM model profile (no arg: list available; with arg: switch to that profile) |
148
166
|`/exit`| quit |
149
167
150
168
Custom commands from `prompts/commands/*.md` are registered as slash commands too (TUI-only — no CLI subcommand is registered for them). Tool availability differs per command: `/init` and `/review` may use all tools except `PlanExit` (hidden for the run, including for spawned sub-agents); custom commands may use everything; `compact`/`summary` run with no tools (a one-shot `chat_sync` call, like session-title generation).
Copy file name to clipboardExpand all lines: python_agent_harness/config.py
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -184,6 +184,8 @@
184
184
# Requires the optional `mcp` extra: pip install -e ".[mcp]".
185
185
DEFAULT_MCP: dict= {"servers": {}}
186
186
187
+
DEFAULT_MODELS: dict= {}
188
+
187
189
# Sub-agent LLM overrides: every key defaults to None, meaning "inherit
188
190
# the main LLM setting" (mirrors gptel-agent-harness-subagent-model /
189
191
# -backend). Only the keys the user actually sets differ from the main
@@ -209,6 +211,17 @@
209
211
"reasoning_effort": "medium",
210
212
"stream": true
211
213
}},
214
+
"models": {{
215
+
"_comment": "Named LLM profiles for /model switching. Each entry is a full set of LLM settings (base_url, api_key, model, etc.). Use /model in the TUI to switch at runtime.",
216
+
"deepseek": {{
217
+
"base_url": "https://api.deepseek.com/v1",
218
+
"model": "deepseek-chat"
219
+
}},
220
+
"openai": {{
221
+
"base_url": "https://api.openai.com/v1",
222
+
"model": "gpt-5-mini"
223
+
}}
224
+
}},
212
225
"subagent_llm": {{
213
226
"_comment": "Optional overrides for sub-agent (Agent tool) requests, e.g. a cheaper model. Every key is optional; unset keys inherit the main llm settings above.",
0 commit comments