feat: add OrcaRouter as a first-class LLM provider - #1
Open
nissrin2020ali-ux wants to merge 1 commit into
Open
Conversation
Adds ORCAROUTER_API_KEY / ORCAROUTER_BASE_URL / ORCAROUTER_MODEL env vars so the pipeline can run entirely on OrcaRouter, an OpenAI-compatible AI gateway. When ORCAROUTER_API_KEY is set it takes over all LLM calls (config resolution only, process.py is untouched); otherwise DeepSeek remains the default. Also documents the new provider in .env.example, CLAUDE.md, and the main.py docstring. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this helps you
AI DailyPulse is a fully automated AI/tech morning digest pipeline: collect → LLM-curate → blog-style digest + cover → multi-channel publish. Its LLM layer has always been a single provider — DeepSeek — wired through
DEEPSEEK_API_KEY/DEEPSEEK_BASE_URLand the OpenAI SDK.If you self-host this pipeline (or want to), you may have run into the same two frictions: DeepSeek's single endpoint locks the pipeline to one model family, and there's no built-in way to add routing, failover, or per-prompt guarding without forking the code. OrcaRouter is an OpenAI-compatible AI gateway — like OpenRouter, it exposes a provider/model namespace across many models — but it also combines adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance behind the same endpoint. Adding
orcarouteras a first-class provider means this project's users can use that stack directly, without treating OrcaRouter as an anonymous custom base URL.What changed
This PR mirrors the existing DeepSeek wiring in
src/config.pywith a named OrcaRouter provider. The pipeline's LLM entry point now resolves like this:ORCAROUTER_API_KEY→ the pipeline runs entirely on OrcaRouter (https://api.orcarouter.ai/v1, default modelorcarouter/auto), exactly like it runs on DeepSeek today.src/process.pyis untouched — it only ever reads the resolvedLLM_API_KEY/LLM_BASE_URL/LLM_MODEL.It also runs gateway-level, zero-trust security for AI agents on the same endpoint — screening every prompt/response and governing every tool call on a default-deny basis, with no application code changes.
Files touched:
src/config.py— namedORCAROUTER_*env vars and provider selection (empty-safe, consistent with the existingenv_strfallback rule).src/main.py— docstring lists the new env vars..env.example— documents the OrcaRouter option alongside DeepSeek.CLAUDE.md— notesORCAROUTER_API_KEYas the alternative provider secret.Verification
python -m py_compileclean on all modules; full pipeline imports clean under both provider branches.src/config.py→src/process.py→ OpenAI SDK): plain chat completion returned 200 withpong, and JSON-mode completion (whatDIGEST_PROMPT/FINALIZE_PROMPTuse) parsed cleanly with_parse_json.ORCAROUTER_API_KEYunset.Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter
I'm an engineer on the OrcaRouter team.