Skip to content

Custom OpenAI-Compatible Provider Endpoints (BYO Endpoint for Local & Remote LLMs) #9303

Closed

Description

@tbitcs

Pre-submit Checks

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:

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:

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

Activity

  1. added
    enhancement
    on Apr 28, 2026
  2. warp-for-oss commented on Apr 28, 2026

    @warp-for-oss
    Contributor

    @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:88 defines LLMProvider as OpenAI, Anthropic, Google, Xai, or Unknown; no generic/custom provider variant is present.
    • app/src/ai/llms.rs:107 defines LLMModelHost as DirectApi, AwsBedrock, or Unknown; no arbitrary endpoint host exists.
    • app/src/server/server_api/ai.rs:2138 maps GraphQL providers into those fixed client provider variants.
    • crates/ai/src/api_keys.rs:23 stores 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:6456 renders API key inputs for OpenAI, Anthropic, and Google only.
    • app/src/ai/agent/api.rs:222 builds the agent request using ApiKeyManager::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:45 sends a warp_multi_agent_api::Request to server_api.generate_multi_agent_output; app/src/ai/agent/api/impl.rs:67 includes model config, BYO keys, supported tools, autonomy, and orchestration flags for the backend.
    • app/src/ai/agent/api/convert_from.rs:621 maps backend ToolCall messages into client-executed actions such as shell commands, file reads, diffs, MCP calls, subagents, and questions. There is no observed ExecuteLLMInference-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

  3. tbitcs commented on Apr 28, 2026

    @tbitcs
    Author

    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:

    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.

  4. added
    area:agent
    area:settings-keybindings
    duplicate
    repro:high
    triaged
    on Apr 28, 2026
  5. shivaylamba commented on Apr 28, 2026

    @shivaylamba

    I have implemented a similar design to add support for Nebius AI Token Factory models

    https://github.com/shivaylamba/warp/tree/nebius-ai-provider

  6. shivaylamba commented on Apr 28, 2026

    @shivaylamba

    @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?

  7. Aeromix commented on Apr 28, 2026

    @Aeromix

    I already forked Warp and adding LM Studio local model support, but I am vibecoding it, and cannot imagine it becoming official code

  8. tbitcs commented on Apr 28, 2026

    @tbitcs
    Author

    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:

    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.

  9. Aeromix commented on Apr 28, 2026

    @Aeromix

    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

  10. shivaylamba commented on Apr 28, 2026

    @shivaylamba

    @Aeromix keep us posted.

  11. tbitcs commented on Apr 28, 2026

    @tbitcs
    Author

    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.

  12. 1 remaining item

  13. tbitcs commented on Apr 29, 2026

    @tbitcs
    Author

    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:

    1. The Warp backend compiles the full prompt (including its proprietary system prompt, context, and tool schemas).
    2. Instead of making the API call to OpenAI/Anthropic itself, the backend streams an ExecuteLLMInference action (or similar) down to the Warp client, containing the fully formulated OpenAI-compatible payload.
    3. The Warp client simply forwards that payload to the local endpoint (like LM Studio or vLLM).
    4. The client streams the LLM's response chunks back up to the backend.
    5. 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.

  14. legomind commented on Apr 29, 2026

    @legomind

    Not perfect (wouldn't work offline), but better than nothing.

  15. Aeromix commented on Apr 29, 2026

    @Aeromix

    We don't control the Warp backend. That is not possible.

  16. tbitcs commented on Apr 29, 2026

    @tbitcs
    Author

    @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.

  17. tbitcs commented on Apr 29, 2026

    @tbitcs
    Author

    @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.

  18. Manoj7ar commented on Apr 29, 2026

    @Manoj7ar

    @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:

    1. Full local provider support (client-owned orchestration)
    2. Inference delegation (Warp-owned orchestration, client-owned inference)
    3. 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.

  19. tbitcs commented on Apr 29, 2026

    @tbitcs
    Author

    @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 }
      where payload is 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 verbatim
    • Completed { 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 Search history by more than just command #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.

  20. Manoj7ar commented on Apr 29, 2026

    @Manoj7ar

    @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?

  21. zerx-lab commented on Apr 30, 2026

    @zerx-lab

    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

  22. tbitcs commented on Apr 30, 2026

    @tbitcs
    Author

    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.

  23. zerx-lab commented on Apr 30, 2026

    @zerx-lab

    @tbitcs Good question — the tool layer in OpenWarp is fully client-side in the OSS binary. Nothing is fetched from Warp's cloud at runtime. Walking through how it's wired:

    1. Tool schemas live in the client.
    Each built-in tool (run_shell_command, read_files, grep, file_glob, apply_file_diffs, search_codebase, ask_user_question, read_shell_command_output, write_to_long_running_shell_command, read_skill, plus MCP-bridged tools) is registered in app/src/ai/agent_providers/tools/*.rs as an OpenAiTool struct holding:

    • name + description (description text lives as Markdown under prompts/tool_descriptions/*.md, ported/rewritten from upstream)
    • parameters: JSON Schema (OpenAPI standard) returned by a fn() -> Value
    • from_args: parses the model's JSON args back into Warp's internal tool_call::Tool variant
    • result_to_json: serializes the executor's ToolCallResult back to a string the upstream model can read

    2. System prompt is a local minijinja template.
    app/src/ai/agent_providers/prompts/system/default.j2 + partials (env.j2, project_rules.j2, skills.j2, tool_aliases.j2, footer.j2). Eight model-family variants ported from opencode so Anthropic / GPT / Gemini / DeepSeek / Kimi / Qwen / Ollama each get a prompt shaped to their training. The user can edit them.

    3. genai 0.6 multiplexes 5 native protocols.
    chat_stream.rs builds a genai::ChatRequest with with_system() + messages + tool list, and dispatches to one of AdapterKind::{OpenAI, OpenAIResponses, Gemini, Anthropic, Ollama} based on the user's provider choice — explicit, no model-name autodetection. genai rewrites the tool list to each provider's native shape (Anthropic input_schema, Gemini function_declarations, etc.).

    4. Closed agent loop, no server in the path.

    model → tool_calls (genai stream)
      → from_args → tool_call::Tool variant
      → emit Message::ToolCall
      → convert_from.rs → AIAgentAction
      → executor (profile / permission / approval gating, same UI as upstream)
      → ToolCallResult written back to conversation
      → next BYOP request → result_to_json → role=tool message to upstream
    

    Approval gating, command execution, file reads, MCP calls, continuation after results — all the orchestration @Manoj7ar listed under "full agent loop" runs locally against whichever endpoint the user configured. Credentials stay in the local SQLite store, never proxied.

    5. What's deliberately not in OpenWarp.
    Anything that genuinely is server-only upstream (cloud agent sessions, hosted model routing, team/cloud sync) is removed in the fork — that's the trade-off for being able to point at any endpoint.

    So to answer directly: the "tooling" you find next-level isn't a server-side secret sauce — at runtime it's a system prompt + a JSON Schema list + an executor with permission gating. OpenWarp reimplements that contract client-side and lets the model on the other end be anything OpenAI/Anthropic/Gemini/Ollama-compatible.

    Source pointers, if useful:

  24. bholmesdev commented on May 6, 2026

    @bholmesdev
    Contributor

    Thanks for raising this. @zachlloyd started a discussion for BYO LLM support across BYOK, arbitrary OpenAI-compatible endpoints, local model support, and ACP. Here's the latest update: #9619 (comment)

  25. petradonka commented on May 22, 2026

    @petradonka
    Contributor

    Thanks for raising this. Warp now supports custom inference endpoints compatible with the OpenAI Chat Completions API.

    You can use this to connect Warp to a model router, gateway, hosted provider, internal endpoint, or self-hosted inference setup. You can configure it in Warp under Settings → AI.

    Docs: https://docs.warp.dev/agent-platform/inference/custom-inference-endpoint/

    Closing this as completed now that custom OpenAI-compatible endpoint support is available. If you hit an issue with a specific provider, endpoint, model, or Warp AI surface, please open a new focused issue with the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentarea:settings-keybindingsduplicateenhancementrepro:hightriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions