feat: switch to OpenAI-compatible /v1/ endpoints#23
Merged
raphasouthall merged 2 commits intomainfrom Mar 16, 2026
Merged
Conversation
Replace all Ollama-native API calls (/api/generate, /api/embed) with OpenAI-compatible /v1/chat/completions and /v1/embeddings endpoints. This enables any OpenAI-compatible provider (Ollama, vLLM, llama.cpp, Together AI, Groq, OpenRouter) with just a URL change. - Convert 11 call sites across 8 files to OpenAI request/response format - Replace Ollama "think: false" with standard "reasoning_effort: none" - Strip markdown fences from JSON responses for provider compatibility - Add llm_api_key / embed_api_key config fields with Bearer auth headers - Support config.toml and NEUROSTACK_LLM_API_KEY / NEUROSTACK_EMBED_API_KEY env vars Closes #21
The setup wizard now prompts for API keys when needed: - Auto-prompts when LLM URL is a cloud provider (non-localhost) - Offers optional key config for local users via confirm prompt - Shares LLM key for embeddings when both use the same URL - Writes keys to config.toml only when set
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.
Summary
/api/generate,/api/embed) with OpenAI-compatible/v1/chat/completionsand/v1/embeddingsendpoints across 11 call sites in 8 filesreasoning_effort: "none"as the standard replacement for Ollama'sthink: false— works with thinking models like qwen3.5llm_api_key/embed_api_keyconfig fields with Bearer auth headers for cloud providersneurostack initwizard to optionally prompt for API keys (auto-prompts for cloud URLs, skips for localhost)What this unlocks
Users can point
llm_url/embed_urlat any OpenAI-compatible provider by changing the URL + key in config:Test plan
uv run ruff check— lint cleanuv run pytest— 160 passed, 6 skipped/v1/endpoint verifiedneurostack initwith cloud URL prompts for API keyCloses #21
🤖 Generated with Claude Code