chore: log image parts attached to provider requests
This commit is contained in:
parent
17a0ebe68b
commit
6c9ac58ce3
1 changed files with 2 additions and 0 deletions
|
|
@ -149,6 +149,8 @@ var MULTIMODAL_PROVIDERS = ['litellm', 'openrouter', 'azure'];
|
||||||
|
|
||||||
function applyImageAttachments(messages, images) {
|
function applyImageAttachments(messages, images) {
|
||||||
if (!Array.isArray(images) || !images.length) return messages;
|
if (!Array.isArray(images) || !images.length) return messages;
|
||||||
|
// One-line observability: confirms image parts reach the provider request.
|
||||||
|
console.log('[clinical-ai] attaching ' + images.length + ' image part(s) to the provider request');
|
||||||
if (MULTIMODAL_PROVIDERS.indexOf(activeProvider) === -1) {
|
if (MULTIMODAL_PROVIDERS.indexOf(activeProvider) === -1) {
|
||||||
var unsupported = new Error('Image attachments require an OpenAI-compatible provider (LiteLLM, OpenRouter, or Azure). The active provider cannot accept image input, so no request was sent.');
|
var unsupported = new Error('Image attachments require an OpenAI-compatible provider (LiteLLM, OpenRouter, or Azure). The active provider cannot accept image input, so no request was sent.');
|
||||||
unsupported.statusCode = 400;
|
unsupported.statusCode = 400;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue