Skip to content

feat: add EvoLink LLM provider#195

Open
EvoLinkAI wants to merge 1 commit into
video-db:mainfrom
EvoLinkAI:feat/evolink-provider
Open

feat: add EvoLink LLM provider#195
EvoLinkAI wants to merge 1 commit into
video-db:mainfrom
EvoLinkAI:feat/evolink-provider

Conversation

@EvoLinkAI

@EvoLinkAI EvoLinkAI commented Jun 17, 2026

Copy link
Copy Markdown

Related Issue

Closes #194

Description

Adds EvoLink as a first-class LLM provider for Director's existing BaseLLM abstraction.

EvoLink's language API is OpenAI-compatible, so this PR keeps the implementation small by reusing the existing OpenAI chat-completions formatting and response parsing while adding EvoLink-specific configuration defaults:

  • EVOLINK_API_KEY
  • EVOLINK_API_BASE=https://direct.evolink.ai/v1
  • EVOLINK_CHAT_MODEL=gpt-5.2
  • DEFAULT_LLM=evolink

This also adds MkDocs documentation, updates the sample env file, and covers provider configuration/default selection with unit tests.

Testing

env -u all_proxy -u http_proxy -u https_proxy -u ALL_PROXY -u HTTP_PROXY -u HTTPS_PROXY \
  .venv/bin/ruff check director/constants.py director/llm/__init__.py director/llm/evolink.py tests/llm/test_evolink.py
# All checks passed!
env -u all_proxy -u http_proxy -u https_proxy -u ALL_PROXY -u HTTP_PROXY -u HTTPS_PROXY \
  .venv/bin/black --check director/llm/evolink.py director/llm/__init__.py director/constants.py tests/llm/test_evolink.py
# All done! 4 files would be left unchanged.
env -u all_proxy -u http_proxy -u https_proxy -u ALL_PROXY -u HTTP_PROXY -u HTTPS_PROXY \
  .venv/bin/python -m pytest tests/llm/test_evolink.py -q
# 4 passed, 10 warnings in 0.61s
env -u all_proxy -u http_proxy -u https_proxy -u ALL_PROXY -u HTTP_PROXY -u HTTPS_PROXY \
  .venv/bin/python -m py_compile director/constants.py director/llm/__init__.py director/llm/evolink.py tests/llm/test_evolink.py
# passed

Real EvoLink compatibility check:

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: Director EvoLink OK"}],"max_tokens":32}'
# HTTP 200
# Director EvoLink OK

Director provider path:

from dotenv import load_dotenv
load_dotenv('/path/to/.env', override=True)
from director.llm.evolink import Evolink, EvolinkConfig
model = Evolink(EvolinkConfig(max_tokens=32, temperature=0))
response = model.chat_completions([
    {'role': 'user', 'content': 'Reply with exactly: Director EvoLink provider OK'}
])
print(response.status, response.content, model.chat_model, model.api_base)
# status= 1
# content= Director EvoLink provider OK
# model= gpt-5.2
# base= https://direct.evolink.ai/v1

Attempted docs validation:

backend/.venv/bin/mkdocs build --strict
# blocked before page build by dev dependency resolution:
# ModuleNotFoundError: No module named 'mkdocstrings.extension'

Summary by CodeRabbit

Release Notes

  • New Features

    • Added EvoLink as a supported LLM integration option alongside OpenAI.
    • EvoLink can be configured via environment variables (EVOLINK_API_KEY, EVOLINK_API_BASE, EVOLINK_CHAT_MODEL).
  • Documentation

    • Added EvoLink integration guide with setup instructions and configuration details.
    • Updated LLM documentation to reflect available integration options.
  • Tests

    • Added test coverage for EvoLink configuration and default LLM selection.

Add a first-class EvoLink LLM integration using the existing OpenAI-compatible chat path with EVOLINK_* configuration defaults. Register the provider in default LLM selection, document usage, and cover config/default-provider behavior with unit tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 515aa11b-4f95-4b9b-80f1-66bdb323eef4

📥 Commits

Reviewing files that changed from the base of the PR and between 70e0b3d and 614f2bb.

📒 Files selected for processing (8)
  • backend/.env.sample
  • backend/README.md
  • backend/director/constants.py
  • backend/director/llm/__init__.py
  • backend/director/llm/evolink.py
  • backend/tests/llm/test_evolink.py
  • docs/llm/evolink.md
  • mkdocs.yml

📝 Walkthrough

Walkthrough

Adds EvoLink as an OpenAI-compatible LLM provider. Introduces LLMType.EVOLINK and EnvPrefix.EVOLINK_ constants, a new evolink.py module with EvolinkConfig and Evolink classes, get_default_llm() selection logic, unit tests, updated env sample, README, and a new documentation page.

Changes

EvoLink LLM Provider

Layer / File(s) Summary
Enum constants and EvoLink module
backend/director/constants.py, backend/director/llm/evolink.py
LLMType.EVOLINK and EnvPrefix.EVOLINK_ added to constants. New EvolinkChatModel enum, EvolinkConfig (extends OpenaiConfig, reads from EVOLINK_ env prefix, validates non-empty api_key), and Evolink class (subclasses OpenAI) defined in evolink.py.
LLM factory selection wiring
backend/director/llm/__init__.py
Evolink imported and get_default_llm() extended with an EVOLINK_API_KEY-derived flag; returns Evolink() when DEFAULT_LLM == LLMType.EVOLINK or when the key is present as a fallback.
Tests, env config, and documentation
backend/tests/llm/test_evolink.py, backend/.env.sample, backend/README.md, docs/llm/evolink.md, mkdocs.yml
Four tests cover config defaults, env overrides, missing-key ValueError, and get_default_llm() selection. EVOLINK_API_KEY/BASE/CHAT_MODEL added to .env.sample. README updated to mention EvoLink alongside OpenAI. New docs/llm/evolink.md page added and registered in mkdocs.yml.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A new link evolved in the warren today,
EvoLink hops in with its own API way.
Config defaults set, the key must be there,
Or ValueError jumps out from its lair.
🐇 Now get_default_llm() knows just where to go—
Another provider joins Director's burrow! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add EvoLink LLM provider' directly and clearly describes the main change—adding EvoLink as a new LLM provider to the system.
Linked Issues check ✅ Passed All objectives from issue #194 are met: EvoLink provider class created, environment variables configured with defaults, DEFAULT_LLM selection logic updated, documentation and tests added.
Out of Scope Changes check ✅ Passed All changes directly support EvoLink LLM provider integration. The DOWNLOADS_PATH reformatting is a minor formatting adjustment without functional impact.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@EvoLinkAI

Copy link
Copy Markdown
Author

Real EvoLink verification completed from Director provider path:

curl https://direct.evolink.ai/v1/chat/completions with model gpt-5.2 -> HTTP 200
response: Director EvoLink OK

Director Evolink(EvolinkConfig(max_tokens=32, temperature=0)).chat_completions(...)
status= 1
content= Director EvoLink provider OK
model= gpt-5.2
base= https://direct.evolink.ai/v1

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.

Add EvoLink as an LLM provider

1 participant