Skip to content

feat(custom-openai): add support for custom OpenAI-compatible API endpoints#7

Merged
debba merged 3 commits into
TabularisDB:mainfrom
niklasschaeffer:dev/openai-compatible
Feb 5, 2026
Merged

feat(custom-openai): add support for custom OpenAI-compatible API endpoints#7
debba merged 3 commits into
TabularisDB:mainfrom
niklasschaeffer:dev/openai-compatible

Conversation

@niklasschaeffer
Copy link
Copy Markdown
Contributor

This pull request adds support for configuring and using custom OpenAI-compatible API endpoints ("custom-openai") throughout the application. It introduces new settings for specifying a custom endpoint URL and model, updates the backend to fetch models and generate responses using the custom provider, and enhances the UI and localization to support these new options.

Backend support for custom OpenAI-compatible providers:

  • Added a new function fetch_custom_openai_models and integrated it into the model-fetching logic, allowing the app to dynamically retrieve available models from a user-specified OpenAI-compatible endpoint (ai_custom_openai_url) using a custom API key. [1] [2] [3]
  • Implemented generate_custom_openai for sending chat completion requests to the custom endpoint, and updated the AI query and explain logic to support the "custom-openai" provider, including error handling for missing configuration. [1] [2] [3]
  • Updated the backend configuration (AppConfig) and config management to persist and retrieve the custom endpoint URL and model, and to recognize a new environment variable for the custom API key. [1] [2] [3]

Frontend settings and context updates:

  • Extended the SettingsContext and default settings to include aiCustomOpenaiUrl and aiCustomOpenaiModel, and added "custom-openai" as a valid AI provider. [1] [2] [3]
  • Updated the Settings page UI to allow users to enter a custom endpoint URL and model when "OpenAI Compatible" is selected, and to display relevant help text. [1] [2] [3]

Internationalization and UI improvements:

  • Added English and Italian translations for the new custom OpenAI endpoint fields and help texts. [1] [2]
  • Updated the provider selection and API key checking logic in the Settings page to include "custom-openai". [1] [2]

These changes collectively enable users to connect the application to any OpenAI-compatible API (such as Groq, local servers, etc.) by specifying their own endpoint and model, greatly increasing flexibility for advanced and enterprise use cases.

@debba
Copy link
Copy Markdown
Collaborator

debba commented Feb 5, 2026

@niklasschaeffer

Really great.

I’m thinking about moving the API keys into their respective sections, right now it’s a bit confusing.

At the beginning there were only a few providers, but now I think it’s becoming important to do this. What do you think?

I added it in your branch, before proceeding to merge, if you want do some checks or change something.

immagine

@niklasschaeffer
Copy link
Copy Markdown
Contributor Author

@debba that's probably fine just go ahead if something breaks I'll fix it later

@debba debba merged commit a249771 into TabularisDB:main Feb 5, 2026
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.

2 participants