Commit Graph

6 Commits

Author SHA1 Message Date
kshitijk4poor
13141c6dcb test(agent): make the fake pool's has_available keyword-only like the real one
A positional call would pass the fake but raise TypeError against the real
CredentialPool, which the diagnostic's suppress() would then swallow.
2026-09-24 21:26:28 +05:30
kshitijk4poor
2f9a14460c fix(agent): name an exhausted primary pool in the init refusal warning
Issue #119533 is the misleading "No LLM provider configured" when the
primary's credential pool is burned. The refusal WARNING only fired when
fallback entries existed and never said why the primary failed, so the
reporter's trigger with no ladder configured still left no trace.

resolve_provider_client returns a bare (None, None), but the pool state
is a cheap local read: ask load_pool(primary) whether it has credentials
yet none available, include "credential pool exhausted" in the WARNING,
and emit it even with no fallback entries. A pool-less, ladder-less
primary (genuine first-run) stays silent to avoid duplicating the raise.
2026-09-24 21:26:28 +05:30
kshitijk4poor
fcc4e17a85 test(agent): fold fallback-refusal suite into two invariants
The explicit-provider test duplicated the refused-ladder test except
for the primary slug, and its startswith() check pinned old log
wording rather than behaviour. Parametrize the refused-ladder test over
an openrouter and an anthropic primary (each asserting its own raise)
and keep the recovered-ladder negative control.

Drop the per-test HERMES_HOME setenv and tmp_path params: conftest
already isolates HERMES_HOME per test and the path never reads it.
2026-09-24 21:26:28 +05:30
kshitijk4poor
c3abdfb978 fix(agent): neutral wording for the init-fallback refusal summary
The explicit-provider branch raises missing_provider_credentials_message,
not the generic 'No LLM provider configured' error, so the WARNING that
summarises refused fallback entries must not assert that verdict. Pin it
with a test on the explicit-provider path.

Refs #119533
2026-09-24 21:26:28 +05:30
kokhlo
47dbdda16c style(test): make the fallback-refusal warning suite formatter-stable
(cherry picked from commit 1c82a53ba958365303edb3a4b967575d7b3ae8ad)
2026-09-24 21:26:28 +05:30
kokhlo
f6659596a0 fix(agent): surface why every init-time fallback entry refused
(cherry picked from commit e0113f673c1d2eefb2a217974893a1d801d3034f)
2026-09-24 21:26:28 +05:30