Custom OpenAI-Compatible Provider Endpoints (BYO Endpoint for Local & Remote LLMs)
Pre-submit Checks
- [x] I have searched Warp feature requests and there are no duplicates
- [x] I have searched Warp docs and my feature is not there
Describe the solution you'd like?
Add support for configuring custom OpenAI-compatible API endpoints, allowing Warp to connect to local or self-hosted LLM providers.
This would enable users to specify:
- A base URL (e.g. http://localhost:8000/v1)
- A model name
- An optional API key
The configured endpoint would be used for Warp AI features such as command suggestions, agent interactions, and inline completions.
The implementation should support standard OpenAI-compatible APIs, including chat completions and streaming responses, so that it works with tools like vLLM, Ollama (via compatibility layer), and other OpenAI-compatible servers.
From a user perspective, this would extend the existing “Bring Your Own Key” model into a “Bring Your Own Endpoint” workflow, where users can choose between built-in providers and a custom endpoint.
Is your feature request related to a problem? Please describe.
Yes.
Currently, Warp AI only supports a fixed set of providers (e.g. OpenAI, Anthropic, Google) via API keys. There is no way to connect Warp to local or self-hosted models.
This creates several limitations:
- Users cannot run Warp AI in privacy-sensitive or offline environments
- Teams with existing LLM infrastructure cannot integrate it
- Developers cannot use open-source models running locally
- All prompts must be sent to external providers, even when a local option is available
Many modern LLM tools (such as vLLM and Ollama) expose OpenAI-compatible APIs, but Warp cannot currently take advantage of this without native support for custom endpoints.
Additional context
This request consolidates several related feature requests:
- #6026 – Custom AI model configuration
- #8708 – Custom AI API endpoints
- #4339 – Local LLM support
- #5735 – Privacy / local AI usage
- #4687 – Custom endpoint (closed as duplicate)
- #3779 – Provider routing limitations
The proposed approach is to extend Warp’s existing provider model to allow any OpenAI-compatible endpoint, rather than introducing provider-specific integrations for each tool.
This would allow immediate compatibility with:
- vLLM (OpenAI-compatible server)
- Ollama (local runtime with compatibility layer)
- LiteLLM and similar proxy systems
Example configuration:
{ "provider": "custom", "base_url": "http://localhost:8000/v1", "model": "meta-llama/Llama-3-8b-instruct", "api_key": "optional" }
This is a provider-level feature and is expected to be cross-platform across all Warp-supported operating systems.
Operating system (OS)
Windows
How important is this feature to you?
5 (Can't work without it!)
Warp Internal (ignore) - linear-label:39cc6478-1249-4ee7-950b-c428edfeecd1
None
@Manoj7ar
Reviewed the thread and the current client code before further changes. I’d keep this grouped with the existing custom/local LLM endpoint cluster rather than treating it as ready for implementation; the useful distinction is provider abstraction parity for the full agent loop, but maintainers need to choose the architecture boundary first.
Code inspection confirms there is no generic OpenAI-compatible base_url / custom-provider path in the client today, and the full agent loop is currently mediated by Warp’s multi-agent backend: the client sends model IDs, BYO keys, context, and supported tool capabilities, then executes tool calls streamed back from the server.
Suggested maintainers to tag for review: @zachbai for Agent Mode/tool-loop behavior, @ianhodge for server API / GraphQL / provider-contract implications, and @lucieleblanc if this moves toward AI settings or BYOK UI changes.
Reasoning
Response mode selected because this run was triggered by an @oz-agent mention on an already-triaged issue with duplicate, triaged, repro:high, area:agent, and area:settings-keybindings labels. Per the workflow, this should answer the specific follow-up and not alter labels.
Duplicate / related-issue assessment: #9303 materially overlaps the existing custom/local LLM endpoint cluster. The strongest overlaps found via gh issue view are #9368 (open, same generic OpenAI-compatible base_url request for Oz/Warp UI), #4687 (open, specify LLM endpoint/APIs), #4339 (open, local LLM providers such as Ollama), and #6026 (open, custom AI model configuration). Closed/redirected related requests include #8708, #7182, #5735, and #3779. The newer thread’s stronger framing is provider abstraction parity / full agent-loop compatibility, but that is a product/architecture clarification over the same capability area rather than a separate implemented bug.
Code findings:
app/src/ai/llms.rs:88definesLLMProviderasOpenAI,Anthropic,Google,Xai, orUnknown; no generic/custom provider variant is present.app/src/ai/llms.rs:107definesLLMModelHostasDirectApi,AwsBedrock, orUnknown; no arbitrary endpoint host exists.app/src/server/server_api/ai.rs:2138maps GraphQL providers into those fixed client provider variants.crates/ai/src/api_keys.rs:23stores BYO keys for named providers (google,anthropic,openai,open_router) and does not store custom base URLs or model endpoint config.app/src/settings_view/ai_page.rs:6456renders API key inputs for OpenAI, Anthropic, and Google only.app/src/ai/agent/api.rs:222builds the agent request usingApiKeyManager::api_keys_for_request(...); the request params carry API keys, model IDs, context, and permissions rather than a custom endpoint contract.app/src/ai/agent/api/impl.rs:45sends awarp_multi_agent_api::Requesttoserver_api.generate_multi_agent_output;app/src/ai/agent/api/impl.rs:67includes model config, BYO keys, supported tools, autonomy, and orchestration flags for the backend.app/src/ai/agent/api/convert_from.rs:621maps backendToolCallmessages into client-executed actions such as shell commands, file reads, diffs, MCP calls, subagents, and questions. There is no observedExecuteLLMInference-style delegated inference action in the client-side conversion path.
Maintainer routing from .github/STAKEHOLDERS: app/src/ai/agent/ maps to @zachbai; app/src/server/server_api/ and crates/graphql/ map to @ianhodge; app/src/settings_view/ maps to @lucieleblanc. If this becomes a spec, the review should likely include both Agent/backend API ownership and Settings/BYOK UI ownership.
This is my automated analysis and may be incorrect. A maintainer will verify the details.
Powered by Oz
This is intended to go beyond the existing requests by focusing on how OpenAI-compatible endpoints integrate with Warp’s full agent system, not just basic chat completion.
From the discussion here, it looks like current approaches (e.g. local adapters) can return text responses but do not support:
- Warp tool calls
- command execution loops
- structured agent workflows
The goal of this proposal is to define a provider abstraction that allows OpenAI-compatible endpoints to participate in the full agentic loop, rather than acting as a limited chat backend.
This would unify:
- custom endpoints (#4687)
- local models (#4339)
- custom APIs (#8708)
into a single capability: first-class provider support for OpenAI-compatible backends within Warp’s agent architecture.
Happy to reflect this explicitly in the spec if this direction makes sense.
I have implemented a similar design to add support for Nebius AI Token Factory models
https://github.com/shivaylamba/warp/tree/nebius-ai-provider
@tbitcs The current Nebius support is a local OpenAI-compatible chat adapter, not a full Warp model backend.
Main limitations:
- It can answer text in Agent, but it cannot call Warp tools yet.
- It does not run the full terminal automation loop: command execution, file edits, structured tool calls, approvals, etc.
Need to get to support the full agentic terminal loop next -
Do you know if OpenAI-compatible endpoints would automatically get support for the full agentic experience or do we need make it manually?
I already forked Warp and adding LM Studio local model support, but I am vibecoding it, and cannot imagine it becoming official code
This is intended to go beyond the existing requests by focusing on how OpenAI-compatible endpoints integrate with Warp’s full agent system, not just basic chat completion.
From the discussion here, it looks like current approaches (e.g. local adapters) can return text responses but do not support:
- Warp tool calls
- command execution loops
- structured agent workflows
The goal of this proposal is to define a provider abstraction that allows OpenAI-compatible endpoints to participate in the full agentic loop, rather than acting as a limited chat backend.
This would unify:
- custom endpoints (#4687)
- local models (#4339)
- custom APIs (#8708)
into a single capability: first-class provider support for OpenAI-compatible backends within Warp’s agent architecture
Happy to reflect this explicitly in the spec if this direction makes sense.
I am wiring up full Warp use, as that's it's value proposition, not to just use it as a chat terminal. I will report if it works
@Aeromix keep us posted.
I am wiring up full Warp use, as that's it's value proposition, not to just use it as a chat terminal. I will report if it works
That sounds aligned with the direction I’m hoping this issue can take.
I agree the useful target is full Warp agent support, not just a chat-style adapter. From the comments above, the important gap seems to be whether OpenAI-compatible/local providers can participate in the full terminal automation loop: tool calls, command execution, file edits, structured outputs, and approvals.
I’m trying to keep this issue focused on the contribution path: first clarifying the feature request, then opening a spec PR once/if it is marked ready-to-spec. I already have draft product.md and tech.md files prepared for that flow.
Happy to compare notes on implementation approaches, especially if your LM Studio work gets full agent behavior working. If there’s a good way to coordinate around a fork or shared branch without jumping ahead of the spec process, I’d be interested.
Okay, so here is the reality. I have it connected to LM Studio and communicating with my local models
But, it is not going to fully work, since Warp server-sides some of their pipeline, including system prompt and tooling.
I feel like this is a dead end. I will not attempt to recreate Warp's magic, that's the true sauce it seems then
Opus:
What we already reuse (and should — this is the whole point):
Proto wire format and the entire ResponseEvent vocabulary Conversation / task / exchange / message model (conversation.rs, task.rs) Streaming UI, chat blocks, "Warping…" indicator, code-block rendering Tool executors in app/src/ai/blocklist/action_model/execute/ — the actual cd, apply diff, read file, grep logic Permission/approval flow (autonomy levels, dangerous-command gating, etc.) Auto-continuation after a tool finishes — the client automatically sends the follow-up request with ToolCallResult packed into Input::UserInputs. We don't build this; we just receive it on the next request Todos, planning UI, suggestion chips — all driven by the same ClientAction events we'd emit That's the bulk of the work. We're already plugged into it.
What is genuinely not in this repo and we have to provide ourselves:
System prompt. Warp's cloud server prepends its own instructions ("you are a coding agent, here are the tools, here's how to format diffs, etc."). That text never reaches the OSS client — the client just builds a Request and the server adds the prompt before hitting the LLM. We have to write a generic one. No way around it. JSON Schemas for tools. Same story — the cloud server translates each ToolType variant into the LLM's expected tool-definition format (Anthropic tool spec, OpenAI function spec, etc.). The schemas don't exist in OSS code (I checked). We have to write a JSON Schema for each tool we want the local model to use. No way around it. Everything else — detecting tool_calls in the model's response, mapping them to ToolCall protos, accepting ToolCallResult back on the continuation, looping — is just plumbing between LM Studio's OpenAI-format streaming and Warp's existing event handling.
Thanks for highlighting this! The challenges you described—specifically that the system prompts, tool JSON schemas, and context management live on the server—are exactly the main hurdles for integrating local models.
However, there is an architectural approach we could take that solves this without having to recreate Warp's "secret sauce" in the open-source client: Inference Delegation.
Instead of trying to duplicate the agent logic in the client, the orchestration could remain entirely on the backend. The flow would look like this:
- The Warp backend compiles the full prompt (including its proprietary system prompt, context, and tool schemas).
- Instead of making the API call to OpenAI/Anthropic itself, the backend streams an
ExecuteLLMInferenceaction (or similar) down to the Warp client, containing the fully formulated OpenAI-compatible payload. - The Warp client simply forwards that payload to the local endpoint (like LM Studio or vLLM).
- The client streams the LLM's response chunks back up to the backend.
- The backend parses the tool calls and continues the agent loop as usual.
This approach would allow us to reuse 100% of Warp's cloud-side pipeline and tools, while ensuring the actual inference and sensitive prompts stay completely local at the network boundary.
Not perfect (wouldn't work offline), but better than nothing.
We don't control the Warp backend. That is not possible.
@legomind You're right that it wouldn't work fully offline since the orchestration step still needs the backend. The privacy benefit would be more about keeping prompts and inference traffic on the local machine — Warp's backend would only see the orchestration metadata, not the actual conversation contents going to your local model. It would still be a meaningful step up from the current state where everything goes through Warp's cloud.
@Aeromix To clarify, the idea isn't for outside contributors to modify the Warp backend directly — that piece would still be on Warp's end. It's a contract change: the backend would emit a new ExecuteLLMInference action (alongside the existing tool actions like RunShellCommand, ReadFiles, etc.), and the OSS client would handle that action by making the HTTP call locally.
The OSS client already executes things on behalf of the backend (shell commands, file reads, MCP calls, etc.). Adding "execute an HTTP request to a user-configured endpoint" as one more delegated action is a natural extension of that existing pattern, not a request to fork or modify the cloud service. It would need Warp team buy-in for the backend side, but the OSS client work would be the same kind of work as adding any other tool action.
@oz-agent I think the distinguishing request here is provider abstraction parity, not just “local model support.”
The current duplicates mostly focus on:
- local inference (Ollama / LM Studio)
- custom model config
- API key routing
But the real architectural gap is:
Can an OpenAI-compatible backend participate in Warp’s full agent loop?
That includes:
- tool calling
- command execution loops
- structured action planning
- approval gating
- continuation after tool results
From the implementation experiments above, the limiting factor doesn’t seem to be inference compatibility — it’s that parts of Warp’s orchestration (system prompt + tool schemas + agent protocol shaping) are still server-owned.
So this issue is less “support localhost as a chat backend” and more:
Expose a provider contract for full agent compatibility
That could be satisfied in multiple ways:
- Full local provider support (client-owned orchestration)
- Inference delegation (Warp-owned orchestration, client-owned inference)
- Hybrid provider adapters
The key request is making the provider boundary explicit enough that OpenAI-compatible endpoints become first-class agent backends, not just text generators.
That feels materially broader than the existing duplicates.
@Manoj7ar — that framing is exactly right, and "provider abstraction parity" captures the actual ask better than anything I've put up so far. Worth pinning at the top of the discussion, IMO.
Building on the three paths you listed, I want to think out loud about what path #2 (inference delegation) might shape up as, mostly to test feasibility — not as a design proposal, and definitely not as a precursor to anything official. I sketched a rough contract for myself privately and tried wiring it up against a personal vLLM endpoint just to see what would actually break, and the broad shape seems plausible:
Rough contract sketch
Backend → client (one new agent action):
ExecuteLLMInference { request_id, base_url, model, api_key?, payload }wherepayloadis the already-compiled OpenAI-format chat-completions body — i.e. Warp's system prompt + tool schemas + conversation, baked in by the backend the same way it does today before calling OpenAI/Anthropic.
Client → backend (streaming result):
Streaming { request_id, chunk }— raw SSE chunks forwarded verbatimCompleted { request_id }/Error/Cancelled
Settings: reuse the existing API-key UI; add base_url + model fields under a "Custom endpoint" entry.
Why I think it's at least worth discussing
- Tool calling, command execution loop, approval gating, continuation after tool results would all stay backend-driven — the OSS client would just proxy inference, similar to how it already proxies shell commands, file reads, and MCP calls on the backend's behalf.
- Privacy benefit even without full offline support: prompts and inference traffic stay on the user's network; the backend sees orchestration metadata only.
- Doesn't preclude path #1 (fully client-owned orchestration) being layered on later if Warp wants offline support down the line.
The big unknown for me is how invasive the backend-side change actually is — that's entirely on Warp's side and I can't reason about it from outside the codebase. The OSS client side appears tractable based on my private experiment, but that's the easier half of the problem.
Discussion question for maintainers, whenever you have a moment
Of the three paths Manoj7ar laid out, is any of them more aligned with where Warp would want this to land than the others? Not asking for a commitment — just trying to gauge whether one direction is a non-starter, so the discussion here can stay focused on something that has a chance of being productive.
@oz-agent could you take a look at this before any further changes are made? Also, could you assign or tag a maintainer for review?
For folks tracking this — there's a community fork OpenWarp that already implements BYOP on top of upstream Warp:
- Plug in any OpenAI / Anthropic / Gemini / Ollama / DeepSeek–compatible endpoint via Base URL + API key (5 native protocols built on genai 0.6)
- Credentials stored locally only, never routed through Warp's cloud
- System prompts are minijinja templates, fully editable (8 model-family templates ported from opencode)
- Blocks / Workflows / Keymaps / AI command suggestions all preserved (continuously merged with upstream)
- models.dev integration for quickly adding model entries
Not affiliated with Warp Inc. — just sharing in case it helps while the official feature is being considered. Source: https://github.com/zerx-lab/warp
For folks tracking this — there's a community fork OpenWarp that already implements BYOP on top of upstream Warp:
- Plug in any OpenAI / Anthropic / Gemini / Ollama / DeepSeek–compatible endpoint via Base URL + API key (5 native protocols built on genai 0.6)
- Credentials stored locally only, never routed through Warp's cloud
- System prompts are minijinja templates, fully editable (8 model-family templates ported from opencode)
- Blocks / Workflows / Keymaps / AI command suggestions all preserved (continuously merged with upstream)
- models.dev integration for quickly adding model entries
Not affiliated with Warp Inc. — just sharing in case it helps while the official feature is being considered. Source: https://github.com/zerx-lab/warp
@zerx-lab How is the tooling handled with OpenWarp for local requests? I suspect Warp keeps its tooling on the cloud to protect it. Warp’s tooling is the only reason I’m drawn to it — it’s next level.