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:
@@ -244,7 +244,9 @@ export function buildAPIProviderProperties(): Property[] {
|
||||
const providerLabel = {
|
||||
bedrock: 'AWS Bedrock',
|
||||
vertex: 'Google Vertex AI',
|
||||
foundry: 'Microsoft Foundry'
|
||||
foundry: 'Microsoft Foundry',
|
||||
openai: 'OpenAI-compatible',
|
||||
gemini: 'Google Gemini',
|
||||
}[apiProvider];
|
||||
properties.push({
|
||||
label: 'API provider',
|
||||
@@ -320,6 +322,36 @@ export function buildAPIProviderProperties(): Property[] {
|
||||
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();
|
||||
if (proxyUrl) {
|
||||
|
||||
Reference in New Issue
Block a user