Skip to content

fix(provider): route runtime inference through the wire adapter - #13

Merged
TheStreamCode merged 1 commit into
mainfrom
fix/runtime-base-url-adapter
Nov 8, 2026
Merged

TheStreamCode merged 1 commit into
mainfrom
fix/runtime-base-url-adapter

Conversation

@TheStreamCode

Copy link
Copy Markdown
Owner

Problem

On Hermes 0.22, ProviderProfile.runtime_base_url() is the only hook resolve_api_key_provider_credentials() reads when it builds the inference base URL, and the base implementation returns None. MuseCodeSubscriptionProfile never overrode it, so profile.base_url (set at import and refreshed by register()) was a dead write: runtime requests resolved to inference_base_url (https://api.meta.ai/v1), bypassing the loopback adapter and getting 403 client_attestation_denied.

Reported in #12.

Change

  • Override runtime_base_url() to return the adapter URL, or the direct endpoint when the adapter could not bind.
  • Tests for the routed path and for the bind-failure fallback.
  • CHANGELOG entry under Unreleased.

Verification

Reproduced against main with the upstream base implementation and the same resolution shape as hermes_cli/auth.py:

profile.base_url resolved runtime URL
before http://127.0.0.1:43219/v1 https://api.meta.ai/v1
after http://127.0.0.1:43219/v1 http://127.0.0.1:43219/v1

CI-equivalent checks on the branch: python -m pytest -q 49 passed, ruff check . clean, validate-plugin.py --path . PASS.

Refs #12

ProviderProfile.runtime_base_url() is the hook Hermes reads when it builds
the inference base URL, and the base implementation returns None. Without an
override the profile's base_url was never consulted, so every subscription
request went straight to api.meta.ai and Meta answered 403
client_attestation_denied even though the loopback adapter was bound.

Return the adapter URL, or the direct endpoint when the adapter could not
bind, from the override.

Refs #12

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@TheStreamCode
TheStreamCode merged commit 028dbbb into main Nov 8, 2026
6 checks passed
@TheStreamCode
TheStreamCode deleted the fix/runtime-base-url-adapter branch November 8, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant