Skip to content

feat: add support for custom OpenAI-compatible API URLs#38

Open
njg7194 wants to merge 1 commit intodtnewman:mainfrom
njg7194:feat/custom-openai-url
Open

feat: add support for custom OpenAI-compatible API URLs#38
njg7194 wants to merge 1 commit intodtnewman:mainfrom
njg7194:feat/custom-openai-url

Conversation

@njg7194
Copy link

@njg7194 njg7194 commented Feb 1, 2026

Summary

This PR adds support for custom OpenAI-compatible API URLs, allowing users to use services like OpenRouter, local LLM servers, or other OpenAI-compatible endpoints.

Changes

  • Add OPENAI_BASE_URL config option in the config module
  • Update OpenAI provider to use custom base URL when provided (falls back to default OpenAI API)
  • Add setup question for custom API base URL during zev --setup
  • Update README with documentation for using OpenAI-compatible APIs

Usage

Users can now configure a custom base URL during setup:

? Your OPENAI api key: sk-or-v1-xxxxx
? Choose which model you would like to default to: gpt-4o-mini
? Custom API base URL: https://openrouter.ai/api/v1

Leaving the custom base URL empty will use the default OpenAI API.

Closes #35

- Add OPENAI_BASE_URL config option to support OpenRouter and other OpenAI-compatible APIs
- Update OpenAI provider to use custom base URL when provided
- Add setup question for custom API base URL
- Update README with documentation for using OpenAI-compatible APIs

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for custom URL for OpenAI

1 participant