mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-22 04:19:40 +00:00
style(gemini): apply Prettier to explicit thinking level change
This commit is contained in:
@@ -203,10 +203,7 @@ type GeminiToolNameOptions = {
|
||||
// generationConfig.thinkingConfig (the operator payload-override surface).
|
||||
// Native thinking-level models require supported enum values. Preserve the
|
||||
// pre-existing passthrough for models that do not use native thinking levels.
|
||||
function extractExplicitThinkingLevel(
|
||||
body: Record<string, unknown>,
|
||||
model: string
|
||||
): string | null {
|
||||
function extractExplicitThinkingLevel(body: Record<string, unknown>, model: string): string | null {
|
||||
const validatesNativeLevel = isGeminiThinkingLevelModel(model);
|
||||
const gc = body.generationConfig as Record<string, unknown> | undefined;
|
||||
const tc = gc?.thinkingConfig as Record<string, unknown> | undefined;
|
||||
|
||||
@@ -48,11 +48,14 @@ test("skips invalid nested levels and honors a valid top-level fallback", () =>
|
||||
});
|
||||
|
||||
test("rejects unknown explicit thinking levels without forwarding them", () => {
|
||||
const config = translatedThinkingConfig({
|
||||
messages: [{ role: "user", content: "hello" }],
|
||||
reasoning_effort: "high",
|
||||
thinkingLevel: "unsupported_level",
|
||||
}, "gemini-3.8-flash");
|
||||
const config = translatedThinkingConfig(
|
||||
{
|
||||
messages: [{ role: "user", content: "hello" }],
|
||||
reasoning_effort: "high",
|
||||
thinkingLevel: "unsupported_level",
|
||||
},
|
||||
"gemini-3.8-flash"
|
||||
);
|
||||
assert.equal(config.thinkingLevel, "high");
|
||||
assert.equal(config.thinkingBudget, undefined);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user