Skip to content

feat: add evolink provider#1773

Merged
looplj merged 1 commit into
looplj:unstablefrom
EvoLinkAI:feat/evolink-channel
Jun 10, 2026
Merged

feat: add evolink provider#1773
looplj merged 1 commit into
looplj:unstablefrom
EvoLinkAI:feat/evolink-channel

Conversation

@EvoLinkAI

Copy link
Copy Markdown
Contributor

Summary

  • add EvoLink as a dedicated channel/provider with two channel types:
    • evolink — OpenAI-compatible chat completions (https://direct.evolink.ai/v1)
    • evolink_anthropic — Anthropic Messages format (https://direct.evolink.ai, anthropic.PlatformDirect)
  • reuse the existing OpenAI-compatible and Anthropic-compatible backend paths — no new transformer package (mirrors the siliconflow / aihubmix_anthropic patterns)
  • backend: channel type enum, default endpoints map, transformer wiring in channel_llm.go; regenerated ent + GraphQL
  • frontend: zod schema, channel/provider configs + provider map, EvolinkIcon, and en/zh i18n entries

Validation

  • make generate + go build ./...
  • go test ./internal/server/biz/ -run "Channel|Endpoint"
  • verified EvoLink upstream API with a real key:
    • POST https://direct.evolink.ai/v1/chat/completions (gpt-5.2) → HTTP 200, returned AxonHub Evolink OK
    • POST https://direct.evolink.ai/v1/messages (claude-opus-4-8) → HTTP 200, returned AxonHub Evolink Anthropic OK
  • frontend type-check/build deferred to CI (the additions mirror existing provider entries 1:1)

Happy to open a tracking issue if preferred — followed the convention of #1695 (provider addition without a linked issue).

@greptile-apps

greptile-apps Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds EvoLink as a new channel provider, following the same pattern used by siliconflow, aihubmix, and opencode_go. All required layers — ent schema/enum, migration, GraphQL, backend transformer wiring, frontend zod schema, channel/provider configs, icon, and both i18n locales — are updated in a single coherent change.

  • evolink routes through the OpenAI-compatible transformer (openai.PlatformOpenAI) with openAICompatibleDefaultEndpoints, matching the default surface of similar aggregator providers.
  • evolink_anthropic routes through anthropic.PlatformDirect with a single AnthropicMessage default endpoint, consistent with aihubmix_anthropic, minimax_anthropic, and others in the same case group.

Confidence Score: 5/5

  • Safe to merge — the change is purely additive and does not modify any existing channel paths.
  • Every required registration point is covered: ent schema, generated enum constants, migration schema, GraphQL enum, backend transformer switch cases, default endpoint map, frontend zod schema, channel and provider configs, icon component, and both i18n locale files. The two new types correctly reuse the established OpenAI-compatible and Anthropic PlatformDirect transformer paths without touching any existing channel logic. No regressions are possible from purely additive enum and map entries.
  • No files require special attention.

Important Files Changed

Filename Overview
internal/server/biz/channel_llm.go Adds TypeEvolink to the OpenAI-compatible transformer case and TypeEvolinkAnthropic to the Anthropic PlatformDirect case; both additions are minimal and consistent with surrounding entries.
internal/server/biz/channel_endpoint.go Adds default endpoint sets for both new channel types: openAICompatibleDefaultEndpoints for evolink and AnthropicMessage-only for evolink_anthropic, consistent with similar providers.
internal/ent/channel/channel.go Adds TypeEvolink and TypeEvolinkAnthropic constants and includes them in TypeValidator; generated file is correctly regenerated.
internal/ent/migrate/schema.go Regenerated migration schema with both new enum values appended to the channels.type column enum list.
internal/server/gql/ent.graphql Adds evolink and evolink_anthropic to the ChannelType GraphQL enum; correctly regenerated.
frontend/src/features/channels/data/config_channels.ts Adds CHANNEL_CONFIGS entries for both types with correct baseURLs, default model lists, and API formats; also adds "evolink" to the Provider union type and CHANNEL_TYPE_TO_PROVIDER map.
frontend/src/features/channels/components/evolink-icon.tsx New SVG icon component for EvoLink; renders an "E" letterform and chevron using currentColor, matching the prop interface used by other custom icons.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Incoming LLM Request] --> B{Channel Type?}
    B -->|evolink| C[openai.PlatformOpenAI Transformer]
    B -->|evolink_anthropic| D[anthropic.PlatformDirect Transformer]
    C --> E["https://direct.evolink.ai/v1\n/chat/completions, /embeddings,\n/images/*, /videos/*"]
    D --> F["https://direct.evolink.ai\n/v1/messages"]
    E --> G[EvoLink Upstream API]
    F --> G
Loading

Reviews (2): Last reviewed commit: "feat: add EvoLink as a built-in provider..." | Re-trigger Greptile

@EvoLinkAI

Copy link
Copy Markdown
Contributor Author

Live validation evidence

Both channel types verified end-to-end against the real EvoLink API (API key omitted; requests run with proxy env vars unset to mirror a clean CI environment).

1) evolink — OpenAI Chat Completions

Request

curl -X POST https://direct.evolink.ai/v1/chat/completions \
  -H "Authorization: Bearer $EVOLINK_API_KEY" -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.2","messages":[{"role":"user","content":"Reply with exactly: AxonHub Evolink OK"}],"max_tokens":50}'

Response — HTTP 200

{
  "id": "chatcmpl-DmgtXzwa4Xb0NkIX4ctF9UthkTYIR",
  "object": "chat.completion",
  "model": "gpt-5.2-2025-12-11",
  "choices": [
    {
      "index": 0,
      "finish_reason": "stop",
      "message": { "role": "assistant", "content": "AxonHub Evolink OK" }
    }
  ],
  "usage": { "prompt_tokens": 16, "completion_tokens": 10, "total_tokens": 26 }
}

2) evolink_anthropic — Anthropic Messages

Request

curl -X POST https://direct.evolink.ai/v1/messages \
  -H "Authorization: Bearer $EVOLINK_API_KEY" -H "Content-Type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{"model":"claude-opus-4-8","max_tokens":50,"messages":[{"role":"user","content":"Reply with exactly: AxonHub Evolink Anthropic OK"}]}'

Response — HTTP 200

{
  "id": "msg_bdrk_01LGvyN8CXvNwTUz6XfnA7yP",
  "type": "message",
  "role": "assistant",
  "model": "claude-opus-4-8",
  "content": [ { "type": "text", "text": "AxonHub Evolink Anthropic OK" } ],
  "stop_reason": "end_turn",
  "usage": { "input_tokens": 30, "output_tokens": 18 }
}

Backend checks

  • make generate — regenerated ent + GraphQL ✅
  • go build ./...
  • go test ./internal/server/biz/ -run "Channel|Endpoint"

Add first-class EvoLink provider support with two channel types:

- evolink: OpenAI-compatible chat completions
  (base URL https://direct.evolink.ai/v1)
- evolink_anthropic: Anthropic Messages format
  (base URL https://direct.evolink.ai, anthropic.PlatformDirect)

Both reuse existing outbound transformers via config only (mirrors the
siliconflow / aihubmix_anthropic patterns); no new transformer package.

Backend: add the two types to the channel ent schema enum, default
endpoints map, and the OpenAI / Anthropic transformer switch in
channel_llm.go; regenerate ent + GraphQL.

Frontend: register both types in the zod schema, channel/provider
configs and provider map, add an EvolinkIcon component, and add en/zh
i18n keys.

Verified against the live API: gpt-5.2 via /v1/chat/completions and
claude-opus-4-8 via /v1/messages both return HTTP 200.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@EvoLinkAI EvoLinkAI force-pushed the feat/evolink-channel branch from 7c72729 to b33c218 Compare June 7, 2026 09:24
@EvoLinkAI

Copy link
Copy Markdown
Contributor Author

Rebased onto the latest unstable to resolve the merge conflict — the branch now coexists cleanly with the newly-merged opencode_go_anthropic channel type (#1791); both the channel enum and the i18n entries keep both types. The ent/GraphQL generated files were regenerated via make generate from the merged schema (not hand-edited). PR is MERGEABLE again.

Re-verified locally after the rebase:

  • make generate + go build ./...
  • go test ./internal/server/biz/ -run "Channel|Endpoint"

The Test/Build/Lint workflows are currently in action_required (first-time fork-contributor gate) — would a maintainer mind approving the workflow runs when convenient? Happy to address anything they surface. Thanks! 🙏

@looplj looplj merged commit 76a001f into looplj:unstable Jun 10, 2026
4 checks passed
junjiangao pushed a commit to junjiangao/axonhub that referenced this pull request Jun 14, 2026
Add first-class EvoLink provider support with two channel types:

- evolink: OpenAI-compatible chat completions
  (base URL https://direct.evolink.ai/v1)
- evolink_anthropic: Anthropic Messages format
  (base URL https://direct.evolink.ai, anthropic.PlatformDirect)

Both reuse existing outbound transformers via config only (mirrors the
siliconflow / aihubmix_anthropic patterns); no new transformer package.

Backend: add the two types to the channel ent schema enum, default
endpoints map, and the OpenAI / Anthropic transformer switch in
channel_llm.go; regenerate ent + GraphQL.

Frontend: register both types in the zod schema, channel/provider
configs and provider map, add an EvolinkIcon component, and add en/zh
i18n keys.

Verified against the live API: gpt-5.2 via /v1/chat/completions and
claude-opus-4-8 via /v1/messages both return HTTP 200.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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