Repository navigation
fix(llm): resolve the provider for call sites that carry a bare model id - #238
Open
HaticeSarp wants to merge 1 commit into
Open
HaticeSarp wants to merge 1 commit into
HaticeSarp wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Author
|
@googlebot I signed it! |
Several paths instantiate Google's client directly via get_google_llm()
instead of going through the configured provider, so configuring a
non-Google provider for every node in artemis.jsonc is still not enough to
run a Flash task. On an OpenRouter-only setup each of these raises "API key
required for Gemini Developer API"; the run keeps going and history
compression dies silently for the whole session.
- services/llm.py: add get_llm_for_model_id(), which infers the provider
from the shape of the model id for the config paths that carry a model
name with no provider beside it. Namespaced ids ("vendor/model", with an
optional ":suffix" routing tag) go to OpenRouter; bare ids keep the
historical Google default.
- agents/flash/summarizer.py, memory/chunking.py: use it for the lens and
fallback models instead of pinning Google.
- agents/flash/runner.py: the emergency operator fallback hardcoded
gemini-2.5-flash, which is unusable off Google and turned a recoverable
config error into a hard failure. Read the configured operator model and
only fall back to the hardcoded id if the config cannot be read at all.
- config/llm.py: the lightweight judge nodes (pixel safety net, planner
validation) are not reachable through the "default"/"nodes" shorthand, so
they pinned a Google flash-lite id regardless of the run's provider. They
now keep that flash-lite default whenever it is actually reachable - the
run is on Google - and otherwise follow the run's resolved config. Only
temperature is forced to 0.
Google setups keep exactly the models they have today; the change is scoped
to the case where the pinned model is unreachable.
Adds tests/unit/test_llm_provider_inference.py covering provider inference
and both judge-default branches.
make test shows no new failures against origin/main (80 pre-existing
failures before and after); make lint and make typecheck are clean.
Fixes google#95
Refs google#167
HaticeSarp
force-pushed
the
fix/provider-routing
branch
from
November 9, 2026 07:32
d18acfa to
7729d52
Compare
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.
Several paths instantiate Google's client directly via get_google_llm() instead of going through the configured provider, so configuring a non-Google provider for every node in artemis.jsonc is still not enough to run a Flash task. On an OpenRouter-only setup each of these raises "API key required for Gemini Developer API"; the run keeps going and history compression dies silently for the whole session.
Google setups keep exactly the models they have today; the change is scoped to the case where the pinned model is unreachable.
Adds tests/unit/test_llm_provider_inference.py covering provider inference and both judge-default branches.
make test shows no new failures against origin/main (80 pre-existing failures before and after); make lint and make typecheck are clean.
Fixes #95
Refs #167