Skip to content

edit_predictions: OpenAI-compatible endpoint - #49388

Closed
oliverbarnes wants to merge 5 commits into
zed-industries:mainfrom
oliverbarnes:openai-compatible-edit-predictions
Closed

edit_predictions: OpenAI-compatible endpoint #49388
oliverbarnes wants to merge 5 commits into
zed-industries:mainfrom
oliverbarnes:openai-compatible-edit-predictions

Conversation

@oliverbarnes

@oliverbarnes oliverbarnes commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

No issue available - this takes up the second suggestion made at #24859 (comment) - cc @probably-neb 👋

if someone were to open a PR that made it so we used the OpenAI-compatible ollama endpoint instead of the ollama specific one (or just add support for OpenAI-compatible API support) then users could use runtimes like vllm to run zeta with speculative decoding locally.

Still testing and refining, but could use feedback. So far I can see predictions when using qwen2.5-coder:3b-base on Ollama

Release Notes:

  • Added support for OpenAI-compatible API in edit predictions

This adds a new edit prediction provider that uses the standard OpenAI
chat completions API (`/v1/chat/completions`), enabling local inference
runtimes like vLLM, TGI, llama.cpp, and LMStudio to serve edit
predictions.

The provider reuses the same Zeta and FIM prompt logic as the Ollama
provider (shared helpers are now `pub(crate)`), but sends requests as
`open_ai::Request` and parses `open_ai::Response`. Auth is optional,
supporting both a settings value and the
`OPENAI_COMPATIBLE_EDIT_PREDICTION_API_KEY` environment variable.

Configurable via settings:

    {
      "edit_predictions": {
        "provider": "openai_compatible",
        "openai_compatible": {
          "api_url": "http://localhost:8000/v1",
          "model": "zeta"
        }
      }
    }
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Feb 17, 2026
@oliverbarnes
oliverbarnes marked this pull request as ready for review February 17, 2026 18:32
@SomeoneToIgnore SomeoneToIgnore added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label Feb 17, 2026
- Rename edit prediction provider module file to `open_ai_compatible.rs` and update references
- Rename settings UI renderer helper to `render_open_ai_compatible_provider`
- Avoid potential panic in Ollama FIM prompt construction by using `split_at_checked`
- Minor log tag consistency for OpenAI-compatible provider
@oliverbarnes
oliverbarnes requested review from a team as code owners February 18, 2026 14:29
@oliverbarnes

Copy link
Copy Markdown
Contributor Author

So far I'm struggling to test this with zeta on vllm. No requests seem to reach vllm for some reason, though curls to it do get a response back.

I'm on a Macbook Air M2 24G, and first time using vllm on it. I got vllm to run with a limited max-model-len (anything bigger made vllm barf):

vllm serve zed-industries/zeta --served-model-name zeta --max-model-len 2048

On Zed's settings I'm also limiting output tokens:

  "edit_predictions": {
    "provider": "openai_compatible",
    "openai_compatible": {
      "api_url": "http://localhost:8000/v1",
      "model": "zeta",
      "max_output_tokens": 64,
    },
  },

The implementation is still working with Ollama, so I'm assuming this is something to do with my vllm setup and my local env limitations.

@probably-neb

Copy link
Copy Markdown
Collaborator

Unfortunately I've decided to close this. Since I posted the comment saying we'd be open to contributions here, we received a large number of upvotes on #49346. Given that context we've decided that the right thing to do here is turn the OpenAI compatible support into a fully-fledged feature and do some internal simplifications while we're at it to handle zeta and other fim models cleanly between the zed hosted offering, ollama, and OpenAI compatible endpoints. Given that this PR is going in a different direction, we're going to build it ourselves rather than branching off from your work. I appreciate the contribution, sorry for the change in direction.

We should have a PR up to solve this in the next day or two

@oliverbarnes
oliverbarnes deleted the openai-compatible-edit-predictions branch February 18, 2026 20:07
@oliverbarnes

Copy link
Copy Markdown
Contributor Author

No worries, makes sense @probably-neb. Always a learning experience, and I'm curious to see what this new implementation will look like

@probably-neb

Copy link
Copy Markdown
Collaborator

Thanks for understanding! The updated PR is up at #49554

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

Labels

area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants