Skip to content

Commit 85cb14c

Browse files
committed
Adds comments
1 parent 67073a4 commit 85cb14c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/ai/openAICompatibleProvider.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,9 @@ interface ChatCompletionRequest {
378378
model: string;
379379
messages: ChatMessage<Role>[];
380380

381-
/** @deprecated */
381+
/** @deprecated but used by Anthropic & Gemini */
382382
max_tokens?: number;
383+
/** Currently can't be used for Anthropic & Gemini */
383384
max_completion_tokens?: number;
384385
metadata?: Record<string, string>;
385386
stream?: boolean;
@@ -403,15 +404,16 @@ interface ChatCompletionResponse {
403404
};
404405
finish_reason: string;
405406
}[];
406-
/** Anthropic compatible output */
407+
/** Anthropic output */
407408
content?: { type: 'text'; text: string }[];
408409
usage: {
409-
input_tokens?: number;
410+
/** OpenAI compatible */
410411
prompt_tokens?: number;
411-
412412
completion_tokens?: number;
413-
output_tokens?: number;
414-
415413
total_tokens?: number;
414+
415+
/** Anthropic */
416+
input_tokens?: number;
417+
output_tokens?: number;
416418
};
417419
}

0 commit comments

Comments
 (0)