Add OpenPaths as an OpenAI-compatible endpoint option - #4
Conversation
OpenRouter's base URL is already env-overridable, so any OpenAI-compatible gateway works by setting OPENROUTER_BASE_URL. Add a short, additive README note showing how to route AI calls through OpenPaths (https://openpaths.io/v1) while keeping OpenRouter as the default. No code changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 365123a143
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| The OpenRouter base URL is overridable, so any OpenAI-compatible gateway works by | ||
| pointing `OPENROUTER_BASE_URL` at it. For example, to use |
There was a problem hiding this comment.
Do not claim OPENROUTER_BASE_URL covers every AI path
This documentation is overbroad for users enabling Deep Research or LangExtract: those AI paths do not read OPENROUTER_BASE_URL; src/services/odr_service.py overwrites OPENAI_BASE_URL with https://openrouter.ai/api/v1, and src/services/langextract_service.py does the same when the OpenAI base URL env vars are unset. With the README's OpenPaths-only example, those features will send the OpenPaths key to OpenRouter and fail authentication, so the note should either scope the claim to OpenRouterClient/classic calls or document the additional base URL variables/code changes needed for ODR/LangExtract.
Useful? React with 👍 / 👎.
What
Documents OpenPaths as a first-class, OpenAI-compatible endpoint option for analystOS, alongside the existing OpenRouter and NanoGPT paths.
OpenPaths is an OpenAI-compatible gateway (like OpenRouter). Because
OpenRouterClientalready reads its base URL fromOPENROUTER_BASE_URL(defined insrc/config.pywith a default), OpenPaths works out of the box by pointing that variable athttps://openpaths.io/v1— no code changes required.Changes
README.md: add a short, additive note in the Configuration section showing how to route AI calls through OpenPaths by settingOPENROUTER_BASE_URL=https://openpaths.io/v1andOPENROUTER_API_KEYto an OpenPaths key. This also surfaces the (previously undocumented)OPENROUTER_BASE_URLoverride.Fully backward-compatible: OpenRouter remains the default; nothing is removed.
Testing
src/config.pydefaultsOPENROUTER_BASE_URLtohttps://openrouter.ai/api/v1and thatOpenRouterClient(src/openrouter.py) builds request URLs from this base, so overriding it transparently routes traffic to any OpenAI-compatible gateway.🤖 Generated with Claude Code