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
@@ -0,0 +1,39 @@
|
||||
# Copyright 2026 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""The video-processing knob is typed once, in the Google provider module."""
|
||||
|
||||
from typing import get_args
|
||||
|
||||
from pydantic import ValidationError
|
||||
import pytest
|
||||
|
||||
from artemis.config.agent import VideoAnalyzerConfig
|
||||
from artemis.llm.google import VideoProcessing
|
||||
|
||||
|
||||
def test_processing_field_reuses_the_provider_literal():
|
||||
assert VideoAnalyzerConfig.model_fields["processing"].annotation is VideoProcessing
|
||||
assert set(get_args(VideoProcessing)) == {"auto", "agentic", "static"}
|
||||
|
||||
|
||||
def test_processing_defaults_to_auto_and_accepts_every_mode():
|
||||
assert VideoAnalyzerConfig().processing == "auto"
|
||||
for mode in get_args(VideoProcessing):
|
||||
assert VideoAnalyzerConfig(processing=mode).processing == mode
|
||||
|
||||
|
||||
def test_processing_rejects_unknown_modes():
|
||||
with pytest.raises(ValidationError, match="processing"):
|
||||
VideoAnalyzerConfig(processing="bogus")
|
||||
Reference in new issue
Block a user