OpenAI
To use OpenAI as an AI provider in Team Edition, configure it as follows:
- Sign up on the OpenAI platform
- Navigate to the API Keys section and generate a new secret key
- In Team Edition, go to Window -> Preferences -> AI -> Model configurations
- Click + and choose OpenAI as the engine to create a profile
- Select API token as the login method and insert the API key into the API token field.
- Choose the model.
- Click Test connection to verify that the key and model work correctly.
- Apply the changes.
Note
OpenAI services are available in specific countries. Consult the supported countries list to verify availability in your location.
Configure an OpenAI-compatible endpoint¶
You can connect to services that provide an OpenAI-compatible API:
- Open Window -> Preferences -> AI -> Model configurations.
- Add or edit an OpenAI provider profile.
- Enter the endpoint in API base URL. If you leave this field blank, Team Edition uses
https://api.openai.com/v1/. - Enter an API token if the endpoint requires Bearer authorization. If you provide a token, Team Edition adds the
Authorization: Bearer <api_key>header automatically. Otherwise, leave the field blank. - Open Advanced settings and add any required headers under Custom HTTP headers. Custom headers can replace an automatically added header, including
Authorization. - Choose a model, test the connection, and apply the changes.
Custom headers apply when Team Edition loads models and sends requests through either the Responses API or the Chat
Completions fallback. Invalid or unsupported headers are rejected with Invalid or unsupported HTTP header: <name>.
Team Edition stores custom-header values as profile secrets.
Example
Configure an endpoint that uses an API key in a custom header as follows:
- API base URL:
https://llm.example.com/v1/. - API token: Leave blank.
- Custom HTTP headers:
X-API-Key: <api_key>.
Settings¶
| Setting | Description | Default |
|---|---|---|
| API token | Enter the provider token if the endpoint requires Bearer authorization | |
| Model | Choose the AI model. Models are loaded dynamically and can be refreshed using the Refresh models button next to the field. You can also type a model name manually. | |
| Context window size | A larger number allows the AI to use more data for better answers but may slow down response time. The size is set dynamically based on the selected model when available. ChatGPT account connections use 128000 as a fallback. |
Model-dependent |
| Temperature | Control AI's creativity from 0.0 (more precise) to 0.9 (more diverse). Note that higher temperature can lead to less predictable results. |
0.0 |
| API base URL | The address where requests to the AI service are sent (for example, https://api.openai.com/v1/). Normally this is filled automatically for the selected provider. Change it only if you use a custom endpoint. |
https://api.openai.com/v1/ |
| Custom HTTP headers | Additional HTTP headers required by the endpoint; available under Advanced settings | |
| Use environment variables | Read supported environment variables to override saved settings; available under Advanced settings | Off |
| Request timeout (sec) | Maximum time Team Edition waits for a response from the AI engine before the request fails; available under Advanced settings | 30 |
| Write AI queries to debug log | Logs your AI requests. For more details on logging, see Log Viewer; available under Advanced settings | disabled |
Tip
If you use OpenAI with a model that supports tool calling, AI tools are available.
Use environment variables¶
| Variable | Description |
|---|---|
OPENAI_API_KEY |
API token |
OPENAI_BASE_URL |
API base URL |
DBEAVER_AI_OPENAI_MODEL |
Model name |
Token and base URL overrides apply to API token authentication, not ChatGPT account authentication.