Skip to content

feat(provider): add AstrLink gateway support - #2418

Merged
zerob13 merged 2 commits into
devfrom
feat/astrlink
Oct 9, 2026
Merged

zerob13 merged 2 commits into
devfrom
feat/astrlink

Conversation

@yyhhyyyyyy

@yyhhyyyyyy yyhhyyyyyy commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

Add AstrLink as a built-in provider using the existing OpenAI-compatible implementation.

  • Default to http://127.0.0.1:18317/v1, with an editable URL and an empty API key. Users supply their AstrLink Access Token.
  • Add the official icon and documentation links; keep the provider disabled by default and embeddings unsupported.
  • Add regression coverage for model discovery, token authentication, custom ports, and icon rendering.
  • Include build-generated provider and ACP registry refreshes in a separate commit.

UI

Before: [Custom provider configuration]
After:  [AstrLink] -> [Connection settings]

Local validation

Completed before push, with no subsequent source changes:

  • 219 main-process tests and 52 renderer tests passed.
  • Format, i18n, lint, typecheck, build, and commitlint passed.
  • Checked the actual Vue components in light and dark themes and the connection dialog.
  • Full Electron startup was blocked by the sandbox's GLIBC version. Live inference against AstrLink was not tested.

Summary by CodeRabbit

  • New Features
    • Added support for connecting to AstrLink through a local endpoint, with API-key authentication and OpenAI-compatible model discovery.
  • Updates
    • Updated release versions and distribution details for supported coding assistants, including Amp, Claude Agent, Gemini CLI, GitHub Copilot, OpenCode, and others.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5318a7cd-7c60-44fd-b658-3a38c2216ce1
📥 Commits

Reviewing files that changed from the base of the PR and between 4eb6062 and 07b139a.

⛔ Files ignored due to path filters (1)
  • src/renderer/src/assets/llm-icons/astrlink.svg is excluded by !**/*.svg
📒 Files selected for processing (7)
  • resources/acp-registry/registry.json
  • resources/model-db/providers.json
  • src/main/provider/defaults.ts
  • src/main/provider/providerRegistry.ts
  • src/renderer/src/components/icons/modelIconRegistry.ts
  • test/main/provider/basicApiKeyProviders.test.ts
  • test/renderer/components/ModelIcon.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

ACP Registry Releases

Layer / File(s) Summary
Update ACP release metadata
resources/acp-registry/registry.json
The registry references newer versions for multiple agents. Binary entries use updated release URLs and checksums where applicable. Package versions are also updated. Listed launch commands and arguments remain unchanged.

AstrLink Provider

Layer / File(s) Summary
Configure and test AstrLink
src/main/provider/defaults.ts, src/main/provider/providerRegistry.ts, test/main/provider/basicApiKeyProviders.test.ts
AstrLink defaults use a local endpoint and an empty API key. The provider registry configures OpenAI-compatible API-key authentication and disables embeddings. Tests cover model discovery and credential validation.
Register and test the AstrLink icon
src/renderer/src/components/icons/modelIconRegistry.ts, test/renderer/components/ModelIcon.test.ts
The model icon registry maps AstrLink to its icon. The renderer test checks the icon asset and dark-mode rendering.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: zerob13

Merge Risk

Merge Risk: ⚪ Minimal · up to 07b13

This adds a disabled-by-default AstrLink provider and refreshes ACP agent release metadata. No concrete merge-blocking risk was identified.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 07b13

The new connection is disabled by default and includes no credential. Existing connection and download controls are reused. No introduced security defect was established in the examined paths, but the refreshed third-party executables and cross-version behavior were not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The provider boundary exposes configured credentials and submitted content to the selected gateway. The ACP refresh affects executable selection on installations using the refreshed catalog. Downstream gateway routing and effective operating-system sandbox privileges were not established.

Trust Boundaries and Controls

  • observed — Binary normalization rejects malformed supplied hashes, and downloading compares supplied SHA-256 values before extraction. Hashes remain optional: Junie records lack them in both base and head. Package distributions use version-qualified references, but this downloader does not establish package-manager artifact integrity.

Resilience and Maintainability Implications

  • observed — Binary installations use agent/version directories and publish installed or error states. Temporary downloads are cleaned up, but extraction writes directly into the installation directory and later attempts can accept command existence without a completion marker. These recovery semantics are unchanged from the PR base and are not retained as a new concern.

Hardening Proposals

  • proposed — As separate hardening, consider staged installation with an explicit completion marker and per-agent serialization so interrupted or overlapping extraction cannot be mistaken for a completed installation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the primary change: adding AstrLink gateway support as a provider.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 5…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zerob13 zerob13 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Registry refresh is genuine upstream drift, not hand-editing — I compared resources/model-db/providers.json before/after semantically: 35 existing providers updated, one bogus v0 entry removed, nothing else added or removed; no astrlink entry there (correct — the provider uses live model discovery via fetch-models, not the static model DB). registry.json only drifts the agents data. This matches the repo convention that these files are refreshed by normal builds, and keeping it in a separate commit was the right call.
  2. Registry definition — OPENAI_BASE + api-key + embeddingStrategy: 'none', identical to Magpie. Resolves to runtimeKind: 'openai-compatible', checkStrategy: 'fetch-models'.
  3. 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 like my-routing-alias survive unchanged), connection check failing with 401 when no token is set, and succeeding with one. The ModelIcon test extension also asserts the new icon is not inverted in dark mode.
  4. Icon — 33-line SVG registered in modelIcons; not added to monoIconUrls (it's a multi-color icon), consistent with how the icon rendering is meant to work — and the test verifies it.
  5. 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 default 18317) — 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.

@zerob13
zerob13 merged commit efccee8 into dev Oct 9, 2026
12 checks passed
@zerob13 zerob13 mentioned this pull request Oct 9, 2026
5 tasks done
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.

2 participants