Skip to content

feat(ai): Add custom base URL support for OpenAI BYOK - #13087

Closed
GeekLuffy wants to merge 2 commits into
warpdotdev:masterfrom
GeekLuffy:feature/byok-openai-custom-base-url
Closed

GeekLuffy wants to merge 2 commits into
warpdotdev:masterfrom
GeekLuffy:feature/byok-openai-custom-base-url

Conversation

@GeekLuffy

@GeekLuffy GeekLuffy commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR adds support for configuring a custom OpenAI base URL under the Bring Your Own Key (BYOK) settings in the AI settings page.

Currently, BYOK is limited to the default OpenAI endpoint (api.openai.com). By introducing this custom base URL configuration, users can route standard OpenAI models (like gpt-4o) to custom OpenAI-compatible endpoints—such as GitHub Copilot (https://api.githubcopilot.com), regional endpoints, or local proxies—directly from the built-in model picker.

Linked Issue

Closes #12251

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

Added unit tests in crates/ai/src/api_keys_tests.rs:

  • serde_round_trip_with_openai_api_url to verify serialization and deserialization of the new openai_api_url field.

  • custom_model_providers_includes_openai_override to verify that custom model providers correctly inject and route the OpenAI models when the custom base URL is enabled.

  • custom_model_providers_excludes_openai_override_when_byo_disabled to verify the security boundary remains intact when BYOK is disabled.

  • I have manually tested my changes locally with ./script/run

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-IMPROVEMENT: Add support for custom base URL configuration to OpenAI Bring Your Own Key (BYOK) settings, enabling third-party OpenAI-compatible endpoints like GitHub Copilot.

@cla-bot cla-bot Bot added the cla-signed label Jun 26, 2026
@warp-for-oss

warp-for-oss Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

@GeekLuffy

Every PR must be linked to a same-repo issue before Oz can review it.

This PR is linked to #12251, but no linked issue is marked ready-to-implement yet. Only repository maintainers apply that label, so please wait for a maintainer to mark the issue. Once it is marked, push a new commit or comment /oz-review to re-trigger review.

See the contribution guidelines for the full readiness model.

Powered by Oz

@warp-for-oss warp-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GeekLuffy

Every PR must be linked to a same-repo issue before Oz can review it.

This PR is linked to #13084, but no linked issue is marked ready-to-implement yet. Only repository maintainers apply that label, so please wait for a maintainer to mark the issue. Once it is marked, push a new commit or comment /oz-review to re-trigger review.

See the contribution guidelines for the full readiness model.

Powered by Oz

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Jun 26, 2026
@GeekLuffy

Copy link
Copy Markdown
Contributor Author

/oz-review

@warp-for-oss warp-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GeekLuffy

Every PR must be linked to a same-repo issue before Oz can review it.

This PR is linked to #12251, but no linked issue is marked ready-to-implement yet. Only repository maintainers apply that label, so please wait for a maintainer to mark the issue. Once it is marked, push a new commit or comment /oz-review to re-trigger review.

See the contribution guidelines for the full readiness model.

Powered by Oz

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

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BYOK: Support custom model providers (e.g., DeepSeek) beyond Anthropic/OpenAI/Google

1 participant