Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(provider): add support for custom provider URLs #474

Merged
merged 4 commits into from
Mar 9, 2025
Merged

Conversation

tusharmath
Copy link
Collaborator

@tusharmath tusharmath commented Mar 9, 2025

Description

This PR adds support for configuring custom provider URLs for OpenAI-compatible API providers including Open Router.

Changes

  • Add 'open_ai_url' method to the Provider enum to allow setting custom URLs
  • Refactor provider key functions to accept string slices for better memory efficiency
  • Check for 'OPENAI_URL' environment variable to configure custom endpoints
  • Update README with comprehensive documentation on provider configuration options
  • Add examples of custom URLs configuration for different scenarios

Related Issues

  • Addresses the need for connecting to self-hosted or enterprise OpenAI-compatible models
  • Improves flexibility for users with custom API endpoints
  • Supports proxy services and regional API deployments

Testing

  • Tested with default Open Router endpoint
  • Tested with custom URL configuration
  • Verified backward compatibility

Breaking Changes

None. This is a backward-compatible enhancement that maintains all existing functionality.

@tusharmath tusharmath changed the title custom url feat(provider): add support for custom provider URLs Mar 9, 2025
@tusharmath tusharmath enabled auto-merge (squash) March 9, 2025 04:35
@tusharmath tusharmath merged commit 3fd46ab into main Mar 9, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant