Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
njbrake
force-pushed
the
fix/upstream-drift-unit-tests
branch
from
September 21, 2026 15:24
daf94cd to
ed4a5f8
Compare
njbrake
force-pushed
the
fix/mcp-v2-import-break
branch
from
September 21, 2026 15:39
d4410a2 to
b842b7c
Compare
All of these became visible once the mcp cap let the suite collect again. - openai 2.x made `cache_write_tokens` required on `InputTokensDetails`. `PromptTokensDetails` carries the field in both openai 2.x and any-llm, and any-llm's Anthropic provider populates it, so mirror the existing getattr chain rather than reporting a constant zero. - any-llm 1.28 retired the `gateway` provider key in favour of `otari`, so `split_model_provider` raises before tinyagent reaches its strip. That strip lives in the tinyagent package and `otari:` cannot stand in here because the otari SDK is not a dependency, so the two `gateway:` params are dropped and the test renamed to what it now covers. Filed as mozilla-ai/tinyagent#23. - `google.adk.tools` resolves names through a lazy importlib loader with a TYPE_CHECKING block, so mypy treats them as imported rather than re-exported. Import from the concrete submodules; runtime behavior is unchanged. Two `patch()` targets in test_google.py were retargeted to match. - any-llm 1.28 widened `split_model_provider` to return `str | LLMProvider`, so coerce through `LLMProvider` in the smolagents assertion. mypy on 3.13 reports no issues across 127 source files. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
njbrake
force-pushed
the
fix/upstream-drift-unit-tests
branch
from
September 21, 2026 15:46
ed4a5f8 to
1cc946a
Compare
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Stacked on #951, which has to merge first. Everything here was invisible until the mcp cap let the suite collect again.
openai 2.x made
cache_write_tokensrequired onInputTokensDetails. Building one with onlycached_tokensraised ValidationError, breakingtest_model_args[OPENAI]andtest_tool_error_llm_mocked[OPENAI]. Chat completions usage has no cache-write counterpart, so report zero. The model allows extra fields, so this stays compatible with older openai versions.any-llm 1.28 moved gateway providers into a config registry and dropped the generic
gatewaykey.AnyLLM.split_model_providerraises before tinyagent can strip the prefix, so the strip attinyagent/agent.py(if provider_name == "gateway") is unreachable. That logic lives upstream, so any-agent cannot fix the behavior here. The twogateway:params are xfail withstrict=Trueandraises=UnsupportedProviderError, so when upstream handles the new naming the xfail fails and forces its own removal.Worth a decision on point 2: is
gateway:meant to keep working (fix tinyagent to recognisemzai), or is it retired and the test should go?A third group, which only becomes visible once #950 lets pre-commit bootstrap and reach mypy:
google.adk.toolsresolves names through a lazy importlib loader with a TYPE_CHECKING block, so mypy treats them as imported rather than re-exported. Import from the concrete submodules. Runtime behavior is unchanged.split_model_providerto returnstr | LLMProvider, somodel._provider.valueno longer typechecks.tests/unit: 314 passed, 8 skipped, 2 xfailed, 0 failed. mypy on 3.13 reports no errors.PR Type
Relevant issues
Depends on #951.
Checklist
On the tests box: no new test file here. Point 1 is covered by the two existing tests it unbreaks, and point 2 changes an existing test's expectation.
AI Usage Information
AI Model used: Claude Opus 5
AI Developer Tool used: Claude Code
Any other info you'd like to share: Written under @njbrake's direction. The reasoning and decisions are his.
I am an AI Agent filling out this form (check box if true)