Repository navigation
feat(provider): add AstrLink gateway support - #2418
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe ACP registry now references updated releases for multiple agents. The provider registry, defaults, and model icon registry now include AstrLink. Tests cover AstrLink model discovery, API-key validation, and icon rendering. ChangesACP Registry Releases
AstrLink Provider
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Suggested reviewers:
|
9be29b8 to
07b139a
Compare
zerob13
left a comment
There was a problem hiding this comment.
Review: add AstrLink gateway support
Verdict: Approve. Clean provider addition following the established local-gateway pattern (same shape as the Magpie entry merged in #2414): defaults.ts entry pointing at the local gateway port http://127.0.0.1:18317/v1, registry definition, icon, and a thorough test. Disabled by default, no baked-in credentials, and the linked GitHub project (AstrLink by the new-api author) is real and resolves.
What the PR contains
Two commits: the feature itself (+129 lines across 6 files) and a separate chore: refresh provider registries commit.
Checks performed
- Registry refresh is genuine upstream drift, not hand-editing — I compared
resources/model-db/providers.jsonbefore/after semantically: 35 existing providers updated, one bogusv0entry removed, nothing else added or removed; noastrlinkentry there (correct — the provider uses live model discovery viafetch-models, not the static model DB).registry.jsononly drifts theagentsdata. This matches the repo convention that these files are refreshed by normal builds, and keeping it in a separate commit was the right call. - Registry definition —
OPENAI_BASE+api-key+embeddingStrategy: 'none', identical to Magpie. Resolves toruntimeKind: 'openai-compatible',checkStrategy: 'fetch-models'. - Tests — both touched suites pass (36 + 8). The new provider test is the most complete of its neighbors: default config, ordering in
DEFAULT_PROVIDERS, definition resolution, discovery with a user token (route aliases likemy-routing-aliassurvive unchanged), connection check failing with 401 when no token is set, and succeeding with one. TheModelIcontest extension also asserts the new icon is not inverted in dark mode. - Icon — 33-line SVG registered in
modelIcons; not added tomonoIconUrls(it's a multi-color icon), consistent with how the icon rendering is meant to work — and the test verifies it. - No breaking changes — purely additive; no i18n copy needed.
Minor notes
- The registry-refresh commit makes the diff ~40x larger than the actual feature. Nothing wrong, but reviewers should look at the first commit only for the feature.
- Inside the test, the discovery instance overrides the port to
28419(vs. the default18317) — this doubles as proof that a user-configured base URL takes effect, which is fine, just noting it so it doesn't read like a typo.
Maintainer note
AstrLink is a third-party self-hosted gateway (same category as Magpie, already merged). The author doesn't appear to be the AstrLink project owner, but adding a third-party gateway to the built-in catalog remains a product/policy call — the code itself is correct and inert until the user configures it.
Changes
Add AstrLink as a built-in provider using the existing OpenAI-compatible implementation.
http://127.0.0.1:18317/v1, with an editable URL and an empty API key. Users supply their AstrLink Access Token.UI
Local validation
Completed before push, with no subsequent source changes:
Summary by CodeRabbit