chore(lint): burn down remaining warnings to zero
This commit is contained in:
@@ -31,9 +31,15 @@ function toOpenAIContent(content: string | MessageContentPart[]): string | OpenA
|
||||
return { type: 'text', text: part.text };
|
||||
}
|
||||
if (part.type === 'image') {
|
||||
if (part.source.type === 'base64' && !part.source.data) {
|
||||
return { type: 'text', text: '[Image omitted: missing base64 data]' };
|
||||
}
|
||||
if (part.source.type !== 'base64' && !part.source.url) {
|
||||
return { type: 'text', text: '[Image omitted: missing URL]' };
|
||||
}
|
||||
const url = part.source.type === 'base64'
|
||||
? `data:${part.source.media_type};base64,${part.source.data!}`
|
||||
: part.source.url!;
|
||||
? `data:${part.source.media_type};base64,${part.source.data}`
|
||||
: part.source.url;
|
||||
return { type: 'image_url', image_url: { url } };
|
||||
}
|
||||
if (part.type === 'audio') {
|
||||
@@ -154,7 +160,7 @@ export class GitHubModelsClient implements ModelClient {
|
||||
|
||||
// Extended thinking/reasoning mode
|
||||
if (request.thinking) {
|
||||
(params as any).reasoning_effort = 'medium';
|
||||
(params as OpenAI.ChatCompletionCreateParamsNonStreaming & { reasoning_effort?: 'low' | 'medium' | 'high' }).reasoning_effort = 'medium';
|
||||
}
|
||||
|
||||
const response = await this.client.chat.completions.create(params);
|
||||
|
||||
Reference in New Issue
Block a user