Skip to content

feat(provider): add Hostlinku provider plugin with connection-scoped /v1/models discovery - #64431

Closed
dyocodes wants to merge 2 commits into
anomalyco:v2from
dyocodes:feat/hostlinku-provider
Closed

dyocodes wants to merge 2 commits into
anomalyco:v2from
dyocodes:feat/hostlinku-provider

Conversation

@dyocodes

Copy link
Copy Markdown

Closes #64413

Adds the built-in Hostlinku provider plugin (packages/core/src/plugin/provider/hostlinku.ts) so a single Hostlinku provider entry adapts to the active API key's service mode (performance, economy, or dedicated).

How it works:

  • Resolves the active hostlinku connection (or HOSTLINKU_API_KEY / configured apiKey) and fetches GET https://api.hostlinku.com/v1/models with Bearer auth.
  • Maps the returned models for that key (id, display_name, context_window, max_output_tokens, capabilities, and USD per-1M-token pricing for input, output, cache_read, and cache_write) onto Model.Info entries while preserving protocol packages and variants from the models.dev catalog when present.
  • Publishes the inventory with sourceConnection via ctx.provider.transform and reloads on Credential.Event.Switched.
  • Reports a needs_auth status on the connection if /v1/models returns 401 or 403, and keeps the last known inventory for the same connection across transient network errors.

Companion catalog PR: anomalyco/models.dev#13893

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@opencodejr

opencodejr Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Thanks for putting this together, @dyocodes!

The v2 branch was promoted to dev on 2026-10-10, and dev is now where v2 work happens. This pull request targets v2, which is no longer used, so it's being closed automatically.

Please open a new pull request from the same branch with dev as the base. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant