agents: always use API backend, remove tools field from .agent files
- Remove is_split special case in daemon — split now goes through job_consolidation_agent like all other agents - call_for_def uses API whenever api_base_url is configured, regardless of tools field (was requiring non-empty tools to use API) - Remove "tools" field from all .agent files — memory tools are always provided by the API layer, not configured per-agent - Add prompt size guard: reject prompts over 800KB (~200K tokens) with clear error instead of hitting the model's context limit Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9d476841b8
commit
6069efb7fc
9 changed files with 17 additions and 31 deletions
|
|
@ -188,7 +188,7 @@ pub(crate) fn call_haiku(agent: &str, prompt: &str) -> Result<String, String> {
|
|||
/// otherwise falls back to claude CLI subprocess.
|
||||
pub(crate) fn call_for_def(def: &super::defs::AgentDef, prompt: &str) -> Result<String, String> {
|
||||
let config = crate::config::get();
|
||||
if config.api_base_url.is_some() && !def.tools.is_empty() {
|
||||
if config.api_base_url.is_some() {
|
||||
super::daemon::log_verbose(&def.agent, "llm-backend",
|
||||
&format!("API: {}", config.api_base_url.as_deref().unwrap_or("?")));
|
||||
let log = |msg: &str| eprintln!("[{}] {}", def.agent, msg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue