hermes-agent/agent
webtecnica 78e844d446 fix(agent): validate credential pool after provider auto-detection (#63425)
Provider auto-detection (URL-based inference for Anthropic, OpenAI Codex,
and xAI endpoints) runs before credential-pool validation in AIAgent init,
but #63048 placed the pool validation before auto-detection. When the agent
is constructed with provider=None and a recognized endpoint URL, the pool
is validated against an empty provider identity and discarded, even though
auto-detection correctly resolves the provider moments later.

Fix: move the credential-pool validation block to after the URL-based
auto-detection chain. The pool is stored on the agent before
auto-detection; validation now checks the resolved provider and only
nullifies agent._credential_pool when the pool's scoped provider genuinely
doesn't match.

Regression test covers all three auto-detection paths:
- Anthropic (api.anthropic.com)
- OpenAI Codex (chatgpt.com/backend-api/codex)
- xAI (api.x.ai)

Fixes #63425.
2026-07-14 16:51:35 +05:30
..
lsp refactor(setup): route dependency installs through the canonical uv→pip→ensurepip ladder 2026-07-07 04:09:35 -07:00
pet fix: remove dead f-string prefixes via ruff F541 (216 sites) (#52336) 2026-07-05 13:42:46 -07:00
secret_sources feat(secrets): adapt 1Password onto the SecretSource interface 2026-07-06 04:58:07 -07:00
transports feat(reasoning): add max and ultra effort levels (#62650) 2026-07-12 00:26:49 -07:00
__init__.py
…
account_usage.py feat(codex): redeem banked usage-limit resets via /usage reset (#64280) 2026-07-14 03:23:19 -07:00
agent_init.py fix(agent): validate credential pool after provider auto-detection (#63425) 2026-07-14 16:51:35 +05:30
agent_runtime_helpers.py fix(agent): restore primary credential pool after fallback (#62417) 2026-07-11 03:44:02 -07:00
anthropic_adapter.py feat(reasoning): add max and ultra effort levels (#62650) 2026-07-12 00:26:49 -07:00
async_utils.py
…
auxiliary_client.py feat(providers): Support DeepInfra as an LLM provider 2026-07-14 02:59:39 +05:30
azure_identity_adapter.py
…
background_review.py fix(runtime): preserve resolved fork metadata 2026-07-10 18:32:32 +05:30
bedrock_adapter.py
…
billing_view.py
…
bounded_response.py fix(agents): bound streaming error-response body reads 2026-07-05 14:00:20 -07:00
browser_provider.py
…
browser_registry.py
…
chat_completion_helpers.py fix(cron): scope inline calls to reported transport 2026-07-11 11:07:34 +05:30
codex_responses_adapter.py fix(codex): enforce Copilot replay policy at dispatch 2026-07-11 12:09:27 +05:30
codex_runtime.py fix(context): persist fallback compaction breaker 2026-07-14 02:19:40 +05:30
coding_context.py test: deflake CI and dev-machine flaky tests in bulk (11 tests, 10 files) (#61816) 2026-07-09 20:03:11 -07:00
context_breakdown.py
…
context_compressor.py fix(context): persist fallback compaction breaker 2026-07-14 02:19:40 +05:30
context_engine.py
…
context_references.py
…
conversation_compression.py fix(context): persist fallback compaction breaker 2026-07-14 02:19:40 +05:30
conversation_loop.py Merge pull request #64004 from kshitijk4poor/salvage/63274-cli-close-persist 2026-07-14 16:45:35 +05:30
copilot_acp_client.py
…
credential_persistence.py feat(auth): make xAI Grok OAuth device-code-only, drop loopback login 2026-07-02 13:17:41 -07:00
credential_pool.py fix(auth): centralize pool auth normalization 2026-07-13 23:20:48 +05:30
credential_sources.py feat(auth): make xAI Grok OAuth device-code-only, drop loopback login 2026-07-02 13:17:41 -07:00
credits_tracker.py
…
curator.py fix(runtime): preserve resolved fork metadata 2026-07-10 18:32:32 +05:30
curator_backup.py fix: remove dead f-string prefixes via ruff F541 (216 sites) (#52336) 2026-07-05 13:42:46 -07:00
display.py fix(display): harden fallback label formatting 2026-07-10 19:14:06 +05:30
error_classifier.py fix(xai): recover legacy encrypted replay failures (#62420) 2026-07-11 03:51:38 -07:00
errors.py
…
file_safety.py fix(image-gen): route local-input credential guard through one shared chokepoint + cover xai (#57698) 2026-07-03 18:47:53 +05:30
gemini_native_adapter.py feat(gemini): improve request context for support and compatibility 2026-07-13 22:26:19 -07:00
gemini_schema.py
…
i18n.py
…
image_gen_provider.py
…
image_gen_registry.py
…
image_routing.py Guard native image routing with file safety 2026-07-05 03:15:03 -07:00
insights.py fix(insights): harden per-route usage attribution 2026-07-11 05:59:42 -07:00
iteration_budget.py
…
jiter_preload.py
…
kanban_stop.py follow-up: integrate agent nudge + dispatcher retry docs and tests 2026-07-14 16:47:33 +05:30
learn_prompt.py
…
learning_graph.py
…
learning_graph_render.py fix: cover remaining GNU-only %-d strftime site in learning graph render 2026-07-05 00:59:35 -07:00
learning_mutations.py
…
lmstudio_reasoning.py
…
manual_compression_feedback.py
…
markdown_tables.py
…
memory_manager.py refactor: address Phase-2 review findings on /new boundary handoff 2026-07-09 03:21:54 +05:30
memory_provider.py
…
message_content.py
…
message_sanitization.py
…
moa_loop.py fix(moa): flatten structured message content in the advisory view (#64319) 2026-07-14 03:22:48 -07:00
moa_trace.py
…
model_metadata.py fix(deepinfra): restore provider-prefix aliases for model parsing 2026-07-14 03:34:25 +05:30
models_dev.py
…
moonshot_schema.py
…
nous_rate_guard.py
…
onboarding.py fix(config): close unreadable-overwrite bug class at a single chokepoint 2026-07-05 23:00:34 +05:30
oneshot.py
…
plugin_llm.py
…
portal_tags.py
…
process_bootstrap.py fix(agent): apply pool-level keepalive to the process_bootstrap sibling builder 2026-07-05 03:14:55 -07:00
prompt_builder.py perf(skills): speed up snapshot prompt builds 2026-07-09 02:41:24 +05:30
prompt_caching.py refactor(salvage): scope #40632 to the two live copy-on-write sites 2026-07-09 14:35:14 +05:30
rate_limit_tracker.py
…
reactions.py feat(agent): core affection reaction detector + reaction_callback 2026-07-10 05:41:59 -05:00
reasoning_timeouts.py fix(reasoning): add deepseek-v4-flash and deepseek-v4-pro to reasoning timeout floor 2026-07-09 15:04:14 +05:30
redact.py fix(redact): skip env-lookup exception for JSON/YAML config field redaction 2026-07-05 13:58:19 -07:00
replay_cleanup.py fix(agent): preserve none vs unknown tool effects (#61783) 2026-07-11 05:41:58 -07:00
retry_utils.py refactor(retry): single-source Z.AI overload short-attempts + drop change-detector assert 2026-07-07 11:57:01 +05:30
runtime_cwd.py
…
secret_scope.py
…
shell_hooks.py fix(cli): safe mode also skips shell-hook registration 2026-07-07 02:32:32 -07:00
skill_bundles.py fix(gateway): apply platform-disabled skill gate to bundle invocations (#59156) 2026-07-05 14:48:11 -07:00
skill_commands.py fix(skills): guard skill slash commands against core-command and slug collisions 2026-07-14 16:41:21 +05:30
skill_preprocessing.py
…
skill_utils.py perf(skills): speed up snapshot prompt builds 2026-07-09 02:41:24 +05:30
ssl_guard.py
…
ssl_verify.py
…
stream_diag.py
…
subdirectory_hints.py
…
system_prompt.py fix(agent): tag desktop chat sessions as desktop 2026-07-08 06:18:18 -07:00
think_scrubber.py
…
thinking_timeout_guidance.py
…
thread_scoped_output.py
…
title_generator.py
…
tool_dispatch_helpers.py fix(agent): preserve none vs unknown tool effects (#61783) 2026-07-11 05:41:58 -07:00
tool_executor.py fix(agent): preserve none vs unknown tool effects (#61783) 2026-07-11 05:41:58 -07:00
tool_guardrails.py
…
tool_result_classification.py fix(agent): preserve none vs unknown tool effects (#61783) 2026-07-11 05:41:58 -07:00
trace_upload.py feat(sessions): trace export + HF upload via 'sessions export --format trace' (#60507) 2026-07-07 15:12:49 -07:00
trajectory.py
…
transcription_provider.py
…
transcription_registry.py fix(deepinfra): harden multimodal provider routing 2026-07-14 02:59:39 +05:30
tts_provider.py
…
tts_registry.py feat(providers): Support DeepInfra as an LLM provider 2026-07-14 02:59:39 +05:30
turn_context.py fix(session): preserve clean multimodal persistence override 2026-07-14 03:32:45 +05:30
turn_finalizer.py fix(session): restore clean API-local turn content 2026-07-14 03:32:46 +05:30
turn_retry_state.py
…
usage_pricing.py feat(openai): cover gpt-5.6 -pro variants (PR #61587 complement) 2026-07-10 00:47:51 +05:30
verification_evidence.py
…
verification_stop.py fix(approval): allow verifier temp cleanup 2026-07-12 04:32:52 -07:00
verify_hooks.py
…
vertex_adapter.py
…
video_gen_provider.py feat(providers): Support DeepInfra as an LLM provider 2026-07-14 02:59:39 +05:30
video_gen_registry.py fix(deepinfra): harden multimodal provider routing 2026-07-14 02:59:39 +05:30
web_search_provider.py fix(web): widen config-aware env resolution to exa/parallel/tavily/brave-free providers 2026-07-06 02:42:24 -07:00
web_search_registry.py fix(web): correct 'disabled plugin' diagnosis for web backends (#59573) 2026-07-06 04:38:17 -07:00