Fix LiteLLM context budgets and direct computer use

Keep efficient context windows separate from expanded maxima throughout discovery, display and provider budgets. Expose correlated computer-use requests and actions with existing permissions, preserve screenshots as images, and retain them across checkpoints, compaction and explicit history recall.

Validation: cargo build on Linux passed. Added focused regression coverage; test execution and native GUI verification remain outside this CLI build-only workflow.
This commit is contained in:
Ryan Ward
2026-10-22 14:25:21 +00:00
parent d5fa711e5c
commit f6c6434e5e
30 changed files with 1176 additions and 101 deletions
+5 -1
View File
@@ -1039,6 +1039,7 @@ fn convert_provider_tool_batch(
matches!(pending.state, PendingToolCallState::RecoveryPending),
)),
Err(message) => invalid_results.push(ToolResult {
images: Vec::new(),
call_id: pending.call.id.clone(),
content: format!("Invalid {} tool input: {message}", pending.call.name),
status: ToolResultStatus::Error,
@@ -8460,7 +8461,10 @@ impl BlocklistAIController {
matches!(
pending.call.name.as_str(),
"request_computer_use" | "use_computer"
)
) && pending.state.result().or_else(|| match event {
galaxy_agent_core::ToolEvent::Completed { result } if result.call_id == pending.call.id => Some(result),
_ => None,
}).is_some_and(|result| result.status == galaxy_agent_core::ToolResultStatus::Success)
});
used_computer.then_some(COMPUTER_USE_PROVIDER_PROFILE)
}