Add web search fee notice for OpenRouter

Closes #3833
This commit is contained in:
Cohee
2025-04-13 14:15:49 +03:00
parent 35395fcb39
commit 22f1aee70b
2 changed files with 9 additions and 0 deletions

View File

@ -1693,6 +1693,11 @@ function calculateOpenRouterCost() {
}
}
if (oai_settings.enable_web_search) {
const webSearchCost = (0.02).toFixed(2);
cost = t`${cost} + $${webSearchCost}`;
}
$('#openrouter_max_prompt_cost').text(cost);
}
@ -5700,6 +5705,7 @@ export function initOpenAI() {
$('#openai_enable_web_search').on('input', function () {
oai_settings.enable_web_search = !!$(this).prop('checked');
calculateOpenRouterCost();
saveSettingsDebounced();
});