Skip to content

Add EvoLink OpenAI-compatible preset#653

Open
EvoLinkAI wants to merge 1 commit into
fathah:mainfrom
EvoLinkAI:evolink-openai-compatible-preset
Open

Add EvoLink OpenAI-compatible preset#653
EvoLinkAI wants to merge 1 commit 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 registers EvoLink as an OpenAI-compatible provider preset across the desktop, intentionally using provider: \"custom\" for all seeded model configs so that the upstream Hermes Agent does not need to recognize a new provider id.

  • Adds EvoLink to PROVIDERS.setup, SETTINGS_SECTIONS, DRIFT_FIELDS, KNOWN_API_KEYS, PROVIDER_ENV_KEYS, URL_TO_ENV_KEY, and URL_KEY_MAP — following the same pattern used by AimlAPI and other OpenAI-compat gateways.
  • Seeds an EvoLink GPT-5.2 default model pointing at https://direct.evolink.ai/v1 with provider: \"custom\", and covers the new paths with four new/updated test cases across six test files.

Confidence Score: 4/5

Safe to merge; the change is additive and uses the established custom-provider path throughout.

The EvoLink integration is consistent with how other OpenAI-compatible gateways (AimlAPI, AtlasCloud) are wired in. Two small gaps exist: the hint for EVOLINK_API_KEY in SETTINGS_SECTIONS points at the API endpoint URL instead of the key-management dashboard, and the evolink provider id registered in PROVIDER_ENV_KEYS has no matching entry in OPENAI_COMPAT_PROVIDERS, creating a latent inconsistency if a model config with provider: evolink is ever produced outside the current setup flow.

src/renderer/src/constants.ts (hint value) and src/shared/url-key-map.ts (OPENAI_COMPAT_PROVIDERS) are worth a second look before merge.

Important Files Changed

Filename Overview
src/renderer/src/constants.ts Adds EvoLink to PROVIDERS.setup and SETTINGS_SECTIONS; the hint for EVOLINK_API_KEY points at the API endpoint URL rather than the key dashboard URL.
src/shared/url-key-map.ts Adds EvoLink URL pattern to URL_KEY_MAP correctly; evolink provider id is not added to OPENAI_COMPAT_PROVIDERS despite being registered in installer.ts PROVIDER_ENV_KEYS.
src/main/default-models.ts Seeds EvoLink GPT-5.2 via provider: custom + baseUrl correctly; trailing blank line before closing bracket removed (cosmetic).
src/main/installer.ts Registers evolink in PROVIDER_ENV_KEYS and adds URL-to-env-key pattern for direct.evolink.ai; changes are consistent with how other providers are registered.
src/main/hermes.ts Adds EVOLINK_API_KEY to KNOWN_API_KEYS for gateway env hydration; also reformats an existing multi-arg call to match prettier style (no logic change).
src/main/config-health.ts Adds EVOLINK_API_KEY to DRIFT_FIELDS for config health drift detection; minimal, correct change.
tests/default-models.test.ts New test file verifying EvoLink model is seeded with provider: custom and the correct baseUrl.
tests/install-gate-providers.test.ts Adds test cases for evolink provider-name lookup and custom URL fallback; also reformats an existing test for consistent style.
tests/url-key-map.test.ts Adds URL-to-key mapping test for direct.evolink.ai; straightforward extension of the existing test fixture.
tests/constants.test.ts Adds test asserting EvoLink uses configProvider: custom and verifies EVOLINK_API_KEY appears in SETTINGS_SECTIONS keys.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User selects EvoLink setup card] --> B["PROVIDERS.setup (constants.ts)\nid: evolink, configProvider: custom\nbaseUrl: https://direct.evolink.ai/v1"]
    B --> C[User enters EVOLINK_API_KEY]
    C --> D["Model seeded with\nprovider: custom\nbaseUrl: https://direct.evolink.ai/v1"]
    D --> E{sendMessage in hermes.ts}
    E -->|provider == custom\nin CLI_COMPAT_PROVIDER_OVERRIDE| F[sendMessageViaCli]
    F --> G["KNOWN_API_KEYS includes EVOLINK_API_KEY\n→ key injected into gateway env"]
    D --> H{Install gate check\nexpectedEnvKeyForModel}
    H -->|provider == custom\nURL fallback| I["URL_TO_ENV_KEY matches\ndirect.evolink.ai\n→ EVOLINK_API_KEY"]
    H -->|provider == evolink\ndirect lookup| J["PROVIDER_ENV_KEYS evolink\n→ EVOLINK_API_KEY"]
    D --> K["URL_KEY_MAP (url-key-map.ts)\ndirect.evolink.ai → EVOLINK_API_KEY"]
    K --> L[Edit Model dialog / Setup wizard key resolution]
    D --> M["DRIFT_FIELDS (config-health.ts)\nEVOLINK_API_KEY drift detection"]
Loading

Comments Outside Diff (1)

  1. src/shared/url-key-map.ts, line 95-113 (link)

    P2 "evolink" omitted from OPENAI_COMPAT_PROVIDERS

    The PR adds "evolink": "EVOLINK_API_KEY" to PROVIDER_ENV_KEYS in installer.ts, teaching the install gate about an explicit provider: "evolink" model config. However, OPENAI_COMPAT_PROVIDERS — which controls routing through the OpenAI-compatible CLI path in hermes.ts and the config-health compat checks — is not updated to include "evolink". If any code path (manual config, import, or a future migration) produces a model with provider: "evolink" rather than provider: "custom", messages will fall off the OpenAI-compat route and likely fail at runtime. The PR's own design uses provider: "custom" exclusively, so this is not a present breakage, but the PROVIDER_ENV_KEYS entry implies the id is a valid first-class provider while the routing set doesn't agree.

Reviews (1): Last reviewed commit: "Add EvoLink OpenAI-compatible preset" | 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