Skip to content

Add EvoLink OpenAI-compatible preset#653

Open
EvoLinkAI wants to merge 2 commits into
fathah:mainfrom
EvoLinkAI:evolink-openai-compatible-preset
Open

Add EvoLink OpenAI-compatible preset#653
EvoLinkAI wants to merge 2 commits into
fathah:mainfrom
EvoLinkAI:evolink-openai-compatible-preset

Conversation

@EvoLinkAI

Copy link
Copy Markdown

Summary

  • add EvoLink as an OpenAI-compatible setup card backed by EVOLINK_API_KEY
  • seed an EvoLink GPT-5.2 default model through the existing custom provider path with https://direct.evolink.ai/v1
  • teach URL/env-key mapping, gateway env hydration, config health, and install-gate checks about direct.evolink.ai

This intentionally uses provider: custom for the seeded model/setup config so the desktop does not require upstream Hermes Agent to recognize a new evolink provider id.

Validation

  • npm ci
  • npx prettier --check src/main/default-models.ts src/renderer/src/constants.ts src/shared/url-key-map.ts src/main/installer.ts src/main/hermes.ts src/main/config-health.ts tests/install-gate-providers.test.ts tests/url-key-map.test.ts tests/constants.test.ts tests/default-models.test.ts
  • npm test -- tests/install-gate-providers.test.ts tests/url-key-map.test.ts tests/constants.test.ts tests/default-models.test.ts tests/provider-registry.test.ts tests/set-model-config-base-url.test.ts (6 files / 76 tests passed)
  • npm run typecheck:node
  • npx eslint src/main/default-models.ts src/renderer/src/constants.ts src/shared/url-key-map.ts src/main/installer.ts src/main/hermes.ts src/main/config-health.ts tests/install-gate-providers.test.ts tests/url-key-map.test.ts tests/constants.test.ts tests/default-models.test.ts (0 errors; existing warnings in src/main/config-health.ts for unused eslint-disable directives)
  • git diff --check
  • rg -n "evolink/auto|api\.evolink\.ai/v1|api\.evolink\.ai" . --glob "!node_modules/**" --glob "!.git/**" returned no matches

Note: npm run typecheck:web currently fails in an unrelated existing test type context: src/renderer/src/screens/Chat/ModelPicker.test.tsx cannot find namespace vi.

@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds EvoLink as an OpenAI-compatible provider preset, threading EVOLINK_API_KEY through env-key injection, URL mapping, install-gate checks, config-health drift detection, and a seeded default model (EvoLink GPT-5.2 via provider: "custom" + baseUrl: "https://direct.evolink.ai/v1").

  • src/main/default-models.ts — seeds one default model entry using provider: "custom" so no upstream Hermes Agent change is required.
  • src/shared/url-key-map.ts / src/main/installer.ts — registers direct.evolink.aiEVOLINK_API_KEY in both the shared URL-key map and the main-process URL-to-env-key array, and adds an "evolink" entry to PROVIDER_ENV_KEYS for any future explicit-provider configs.
  • src/renderer/src/constants.ts — adds an EvoLink setup card in PROVIDERS.setup and a password field in SETTINGS_SECTIONS; tests cover both additions.

Confidence Score: 5/5

This is a safe, additive preset registration — no existing code paths are modified, only new entries are threaded into well-established registration points.

The change consistently registers EVOLINK_API_KEY across all required touch-points (env injection, URL mapping, install gate, config-health drift, UI settings), uses the proven provider: 'custom' path rather than introducing a new first-class provider ID, and ships test coverage for every new entry. No logic is altered and no existing entries are removed.

src/renderer/src/constants.ts — the hint for EVOLINK_API_KEY points at the API endpoint rather than the key dashboard (flagged in a prior review thread).

Important Files Changed

Filename Overview
src/main/default-models.ts Adds EvoLink GPT-5.2 default model entry using provider: 'custom' and the direct.evolink.ai/v1 base URL; consistent with the existing pattern for custom OpenAI-compatible endpoints.
src/shared/url-key-map.ts Adds direct.evolink.ai → EVOLINK_API_KEY to URL_KEY_MAP; OPENAI_COMPAT_PROVIDERS is not updated, consistent with the PR's deliberate use of provider: 'custom' but creates a gap if a future config uses provider: 'evolink'.
src/main/installer.ts Registers 'evolink' in PROVIDER_ENV_KEYS and direct.evolink.ai in URL_TO_ENV_KEY; both additions are consistent with the patterns for other providers.
src/renderer/src/constants.ts Adds EvoLink setup card and SETTINGS_SECTIONS password field; hint is set to the API endpoint URL rather than the key dashboard (already flagged in prior review thread).
src/main/hermes.ts Adds EVOLINK_API_KEY to the KNOWN_API_KEYS injection list so the CLI subprocess can access the key; straightforward addition matching all other providers.
src/main/config-health.ts Adds EVOLINK_API_KEY to the DRIFT_FIELDS env-drift check list; minor observation that AIMLAPI_API_KEY is absent from this list but is not a regression introduced here.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User sets EVOLINK_API_KEY in Settings] --> B[SETTINGS_SECTIONS\nconstants.ts]
    B --> C{Model config\nprovider?}
    C -->|provider: custom\nbaseUrl: direct.evolink.ai/v1| D[URL_KEY_MAP\nurl-key-map.ts]
    C -->|provider: evolink| E[PROVIDER_ENV_KEYS\ninstaller.ts]
    D --> F[Resolve EVOLINK_API_KEY]
    E --> F
    F --> G[KNOWN_API_KEYS injection\nhermes.ts]
    G --> H[CLI subprocess\nreceives EVOLINK_API_KEY]
    H --> I[EvoLink API\nhttps://direct.evolink.ai/v1]
    J[Default seeded model\nEvoLink GPT-5.2\nprovider: custom] --> D
    K[config-health.ts\nDRIFT_FIELDS] --> L[Drift audit\ndetects EVOLINK_API_KEY\nin .env]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[User sets EVOLINK_API_KEY in Settings] --> B[SETTINGS_SECTIONS\nconstants.ts]
    B --> C{Model config\nprovider?}
    C -->|provider: custom\nbaseUrl: direct.evolink.ai/v1| D[URL_KEY_MAP\nurl-key-map.ts]
    C -->|provider: evolink| E[PROVIDER_ENV_KEYS\ninstaller.ts]
    D --> F[Resolve EVOLINK_API_KEY]
    E --> F
    F --> G[KNOWN_API_KEYS injection\nhermes.ts]
    G --> H[CLI subprocess\nreceives EVOLINK_API_KEY]
    H --> I[EvoLink API\nhttps://direct.evolink.ai/v1]
    J[Default seeded model\nEvoLink GPT-5.2\nprovider: custom] --> D
    K[config-health.ts\nDRIFT_FIELDS] --> L[Drift audit\ndetects EVOLINK_API_KEY\nin .env]
Loading

Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

key: "EVOLINK_API_KEY",
label: "EvoLink API key",
type: "password",
hint: "https://direct.evolink.ai/v1",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Hint shows API endpoint URL, not key-management URL

The hint field for EVOLINK_API_KEY is set to "https://direct.evolink.ai/v1" — the API base URL rather than a page where users can obtain a key. Every other provider entry either uses an i18n hint key (e.g., "constants.aimlapiHint") or omits the field, none of them point at the service's /v1 endpoint. A user opening the settings panel to find their key will see a URL that navigates to the API gateway, not the key dashboard. The key URL "https://evolink.ai/dashboard/keys" is already in the PROVIDERS.setup entry and would be the more helpful hint value here.

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