Repository navigation
OpenAI-compatible endpoints via base_url (v0.14.2) - #16
Merged
Merged
Conversation
dispatchOpenAI now uses plain fetch with a configurable base_url (OPENAI_BASE_URL or providers.openai.base_url), dropping the OpenAI SDK dependency, and reads reasoning_content when content is empty so reasoning models (qwen3, deepseek-r1) aren't silently lost.
scr1p7k177y
added a commit
that referenced
this pull request
Oct 4, 2026
OpenAI-compatible endpoints via base_url (v0.14.2)
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.
Stacked on #15 (base =
docs/sample-usage-and-offline-demo). Merge #15 first, then this — basing onmainwould conflict on the README/CHANGELOG/version lines #15 already touches.What
dispatchOpenAInow reaches any service speaking the OpenAI/chat/completionsREST shape — NVIDIA, Together, Groq, OpenRouter, vLLM, LM Studio. Plainfetch, no SDK dependency.base_urlfromOPENAI_BASE_URLenv (wins) orconfig/providers.openai.base_url, defaulthttps://api.openai.com/v1. Env-first mirrorsgetApiKey().reasoning_contentwhencontentis empty, so reasoning models (qwen3, deepseek-r1) aren't silently dropped.openaiSDK require that made the old path unusable.Why
The previous
dispatchOpenAIhardcodedapi.openai.comandrequire('openai')(never a dependency), so OpenAI-compatible providers were unreachable.Tests / validation
content/reasoning_contentparsing, trailing-slash base_url, non-ok status throw, usage-estimate fallback. 204 tests pass, lint clean,npm ciclean.meta/llama-3.3-70b-instruct: a real task ran researcher → self-eval through this code path (status=done, real TAM/SAM/SOM output, eval 4/5, provider=openai). Key supplied via env only; nothing secret committed.Docs / version
README "OpenAI-compatible providers" section, commented NVIDIA example in
providers.yaml, CHANGELOG[0.14.2], version bumped 0.14.1 to 0.14.2 (package.json, package-lock x2, server.js, README badge).