Skip to content

add custom OpenAI compatible API support#75

Closed
raniaamina wants to merge 4 commits intopescheckit:mainfrom
raniaamina:main
Closed

add custom OpenAI compatible API support#75
raniaamina wants to merge 4 commits intopescheckit:mainfrom
raniaamina:main

Conversation

@raniaamina
Copy link
Copy Markdown

Hi, i add option for custom OpenAI Comptible API, this will help user with other provider that not supported before.
Thanks.

@brammittendorff
Copy link
Copy Markdown
Contributor

Thanks for the contribution @raniaamina!

I appreciate the effort, but we prefer to keep the codebase focused on concrete implementations rather than generic templates. The "custom" provider is essentially a catch-all that doesn't add specific value.

Alternative approach:
If you need support for a specific provider (Groq, Together.ai, Fireworks, etc.), please let us know which one and we can add that specific implementation. That way we have:

  • Provider-specific model lists and defaults
  • Proper error handling for that service
  • Clear documentation for that specific use case

Current workaround:
In the meantime, you can use the DeepSeek provider with a custom base URL for most OpenAI-compatible APIs:

gpt-po-translator --provider deepseek \
  --deepseek-key YOUR_API_KEY \
  --deepseek-base-url https://api.your-provider.com/v1 \
  --folder ./locales

Which specific provider are you trying to use? We can discuss adding official support for it.

@raniaamina
Copy link
Copy Markdown
Author

Thank you for respons, actually the background of this PR is when i use this tool with LM Studio with some model and z.ai API. At that time i don't know that deepseek provider can use custom BASE API URL and select the model used.

So i think, 'maybe' there are also people out there has same issue with me, that's why i try to make option for generic custom API provider that compatible with OpenAI API more recognizeable by users.

But, of course if it seem not too important or necessary, no problem to reject it. :")

@pescheck-bram
Copy link
Copy Markdown
Contributor

pescheck-bram commented Feb 16, 2026

@raniaamina Thanks for the PR! We've implemented this in #76.

Added openai_compatible provider for LM Studio, z.ai, and other OpenAI-compatible APIs:

gpt-po-translator --provider openai_compatible \          
  --openai-compatible-key YOUR_KEY \
  --openai-compatible-base-url http://localhost:1234/v1 \
  --folder ./locales

Old --deepseek-* args still work. Appreciate the contribution! 🙏

Fixed in version 2.0.3

@raniaamina
Copy link
Copy Markdown
Author

Great! Thanks for giving attention about this issue:")

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.

3 participants