fix: show OpenAI/Gemini provider info in /status panel

The /status panel showed 'undefined' for the API provider label when
using OpenAI or Gemini providers, and did not display the base URL or
model name. Added provider labels and property sections for both.

Relates to #39

Co-Authored-By: Juan Camilo <juancamilo.auriti@gmail.com>
This commit is contained in:
Juan Camilo
2026-04-01 17:04:42 +02:00
parent 8750f84464
commit 481e608903

View File

@@ -244,7 +244,9 @@ export function buildAPIProviderProperties(): Property[] {
const providerLabel = { const providerLabel = {
bedrock: 'AWS Bedrock', bedrock: 'AWS Bedrock',
vertex: 'Google Vertex AI', vertex: 'Google Vertex AI',
foundry: 'Microsoft Foundry' foundry: 'Microsoft Foundry',
openai: 'OpenAI-compatible',
gemini: 'Google Gemini',
}[apiProvider]; }[apiProvider];
properties.push({ properties.push({
label: 'API provider', label: 'API provider',
@@ -320,6 +322,36 @@ export function buildAPIProviderProperties(): Property[] {
value: 'Microsoft Foundry auth skipped' value: 'Microsoft Foundry auth skipped'
}); });
} }
} else if (apiProvider === 'openai') {
const openaiBaseUrl = process.env.OPENAI_BASE_URL;
if (openaiBaseUrl) {
properties.push({
label: 'OpenAI base URL',
value: openaiBaseUrl
});
}
const openaiModel = process.env.OPENAI_MODEL;
if (openaiModel) {
properties.push({
label: 'Model',
value: openaiModel
});
}
} else if (apiProvider === 'gemini') {
const geminiBaseUrl = process.env.GEMINI_BASE_URL;
if (geminiBaseUrl) {
properties.push({
label: 'Gemini base URL',
value: geminiBaseUrl
});
}
const geminiModel = process.env.GEMINI_MODEL;
if (geminiModel) {
properties.push({
label: 'Model',
value: geminiModel
});
}
} }
const proxyUrl = getProxyUrl(); const proxyUrl = getProxyUrl();
if (proxyUrl) { if (proxyUrl) {