fix(acp): resolve reasoning_config for ACP and Feishu comment agents
`SessionManager._make_agent` and the Feishu doc-comment agent built their `AIAgent` without `reasoning_config`, so `agent.reasoning_effort: none` never reached those sessions: the transport applied its default effort, which non-reasoning models such as gpt-4o-mini reject with HTTP 400 and which silently re-enables thinking everywhere else. Both surfaces now go through `hermes_constants.resolve_reasoning_config`, the same chokepoint the CLI, gateway, TUI, cron and `hermes -p` already use, resolved against the model the session actually runs so per-model overrides apply. Ported from PR #85164 by @Chinmayrawat15 (oneshot hunk already on main). Fixes #85153
This commit is contained in:
@@ -391,6 +391,7 @@ class SessionManager:
|
||||
from run_agent import AIAgent
|
||||
from hermes_cli.config import load_config
|
||||
from hermes_cli.runtime_provider import resolve_runtime_provider
|
||||
from hermes_constants import resolve_reasoning_config
|
||||
|
||||
config = load_config()
|
||||
model_cfg = config.get("model")
|
||||
@@ -411,6 +412,10 @@ class SessionManager:
|
||||
"disabled_toolsets": list(disabled_toolsets) if disabled_toolsets is not None else None,
|
||||
"model": model or default_model,
|
||||
"cwd": cwd,
|
||||
# Same chokepoint as the CLI/gateway/TUI/cron: without it ``agent.reasoning_effort: none`` never
|
||||
# reaches an ACP session and the transport applies its default effort (a 400 on non-reasoning
|
||||
# models). Resolved against the session's model so per-model overrides apply.
|
||||
"reasoning_config": resolve_reasoning_config(config, model or default_model),
|
||||
}
|
||||
try:
|
||||
runtime = resolve_runtime_provider(
|
||||
|
||||
Reference in New Issue
Block a user