Skip to content

Commit ad3d98f

Browse files
chore: format
1 parent 68f494e commit ad3d98f

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

src/providers/openrouter/chatComplete.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,11 @@ interface OpenrouterChatCompleteResponse extends ChatCompletionResponse {
123123
object: string;
124124
created: number;
125125
model: string;
126-
choices: (ChatChoice & { message: Message & {
127-
reasoning: string;
128-
reasoning_details?: any[]
129-
}
126+
choices: (ChatChoice & {
127+
message: Message & {
128+
reasoning: string;
129+
reasoning_details?: any[];
130+
};
130131
})[];
131132
usage: OpenrouterUsageDetails;
132133
}
@@ -198,7 +199,9 @@ export const OpenrouterChatCompleteResponseTransform: (
198199
content_blocks.push({
199200
type: 'thinking',
200201
thinking: c.message.reasoning,
201-
...(c.message.reasoning_details && { reasoning_details: c.message.reasoning_details }),
202+
...(c.message.reasoning_details && {
203+
reasoning_details: c.message.reasoning_details,
204+
}),
202205
});
203206
}
204207

@@ -215,7 +218,9 @@ export const OpenrouterChatCompleteResponseTransform: (
215218
content: c.message.content,
216219
...(content_blocks.length && { content_blocks }),
217220
...(c.message.tool_calls && { tool_calls: c.message.tool_calls }),
218-
...(c.message.reasoning_details && { reasoning_details: c.message.reasoning_details }),
221+
...(c.message.reasoning_details && {
222+
reasoning_details: c.message.reasoning_details,
223+
}),
219224
},
220225
finish_reason: c.finish_reason,
221226
};

src/types/requestBody.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export interface Message {
311311
tool_calls?: any;
312312
tool_call_id?: string;
313313
citationMetadata?: CitationMetadata;
314-
/** Reasoning details for models that support extended thinking/reasoning. (Gemini) */
314+
/** Reasoning details for models that support extended thinking/reasoning. (Gemini) */
315315
reasoning_details?: any[];
316316
}
317317

0 commit comments

Comments
 (0)