feat: add agentic video analysis and clarify action results
Report device actions as dispatched and preserve full failure details. Route Flash through McpActionExecutor and use ToolFailure across helper tools and agent loops instead of inferring failure from response text. Require model-provided descriptions for coordinate targets. Keep observed element metadata separate from those descriptions in safety checks, visual summaries, history, and frontend labels. Add Gemini Interactions API video analysis with configurable processing mode, chunk size, and timeouts. Centralize Google provider capabilities and token usage normalization, and update google-genai to 2.22.0. Preserve system instructions on follow-up interactions, replan pending chunks when falling back to static processing, and reject unanswered native video and audio segments instead of caching placeholder results. Keep helper-tool failure status intact through history tools and committee calls. Validation: 1,762 Python unit tests passed (3 skipped), 40 frontend formatter tests passed, and the production UI build completed. Ruff lint, formatting, the quality ratchet, and git diff checks passed.
This commit is contained in:
1 parent
611d1a0947
commit
a45daf23f8
120 files changed
+6301
-1710
No files matched your search
+4
-13
@@ -45,6 +45,7 @@ from artemis.config import (
|
||||
)
|
||||
from artemis.context import ArtemisContext
|
||||
from artemis.data_engine.trace import CURRENT_TRACE_ID, DataEngineCallbackHandler
|
||||
from artemis.llm.google import is_google_chat_model, is_google_provider
|
||||
from artemis.llm.reliability import (
|
||||
CircuitBreaker,
|
||||
FailureCategory,
|
||||
@@ -550,20 +551,10 @@ class RobustChatModelWrapper:
|
||||
processed_tools = list(tools_list) if tools_list is not None else []
|
||||
|
||||
# Determine if the underlying model provider is Google / Gemini
|
||||
is_google_provider = False
|
||||
if self.endpoint is not None:
|
||||
is_google_provider = self.endpoint.provider in (
|
||||
ModelProvider.GOOGLE,
|
||||
ModelProvider.GEMINI,
|
||||
)
|
||||
google_backed = is_google_provider(self.endpoint.provider)
|
||||
else:
|
||||
base_model_cls = getattr(self.base_model, "__class__", None)
|
||||
base_model_name = base_model_cls.__name__ if base_model_cls else ""
|
||||
is_google_provider = (
|
||||
"Google" in base_model_name
|
||||
or "Gemini" in base_model_name
|
||||
or "VertexAI" in base_model_name
|
||||
)
|
||||
google_backed = is_google_chat_model(self.base_model)
|
||||
|
||||
has_explicit_google_search = any(
|
||||
isinstance(t, dict) and "google_search" in t for t in processed_tools
|
||||
@@ -572,7 +563,7 @@ class RobustChatModelWrapper:
|
||||
self.endpoint is not None and self.endpoint.enable_grounding
|
||||
) or has_explicit_google_search
|
||||
|
||||
if is_google_provider:
|
||||
if google_backed:
|
||||
if should_ground:
|
||||
# Add native Google Search Grounding tool if not already present
|
||||
if not has_explicit_google_search:
|
||||
|
||||
Reference in new issue
Block a user