Skip to content

Add OpenAI-Compatible API Support#41

Open
ninjaeon wants to merge 1 commit intoDarsh-A:mainfrom
ninjaeon:openai-compatible-endpoint
Open

Add OpenAI-Compatible API Support#41
ninjaeon wants to merge 1 commit intoDarsh-A:mainfrom
ninjaeon:openai-compatible-endpoint

Conversation

@ninjaeon
Copy link

@ninjaeon ninjaeon commented Oct 9, 2025

Summary

  • Add OpenAI-compatible API endpoint support as 4th AI provider option
  • Configurable endpoint URL, API key, and model settings
  • Supports any service using OpenAI chat completions format
  • Uses standard OpenAI chat completions API structure
  • Consistent error handling and response processing

Test plan

  • Verify "OpenAI-Compatible" appears in AI model dropdown
  • Test with OpenAI API endpoint and valid API key
  • Test with any custom OpenAI-compatible endpoint
  • Verify error handling for invalid endpoints/API keys
  • Test with various compatible model names

Implementation Details

  • Added preference keys for endpoint URL, API key, and model
  • Implemented OpenAI-compatible API call logic following chat completions format
  • Updated AI model selection to include option 4
  • Consistent prompt template and generation config structure
  • Uses same categorization logic as other AI providers

Compatibility

Works with any service supporting OpenAI chat completions format:

  • OpenAI API (default endpoint)
  • Local LLM servers (LM Studio, Oobabooga, etc.)
  • Custom endpoints that follow OpenAI's API structure
  • Users can configure any compatible endpoint manually

Note: This is a generic OpenAI-compatible implementation - users need to configure specific endpoints manually if they want to use services other than OpenAI.

💘 Generated with Crush CLI using GLM-4.6 to vibe code these features. Manual review is recommended as I'm not a programmer.

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.

1 participant