mirror of
https://github.com/kennethnym/aris.git
synced 2026-04-16 06:41:17 +01:00
fix(backend): disable reasoning and fallback to reasoning field (#90)
Set reasoning effort to none in the LLM client to reduce latency and token usage. Fall back to the reasoning field when content is absent in the response. Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -50,11 +50,13 @@ export function createLlmClient(config: LlmClientConfig): LlmClient {
|
|||||||
schema: enhancementResultJsonSchema,
|
schema: enhancementResultJsonSchema,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
reasoning: { effort: "none" },
|
||||||
stream: false,
|
stream: false,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const content = response.choices?.[0]?.message?.content
|
const message = response.choices?.[0]?.message
|
||||||
|
const content = message?.content ?? message?.reasoning
|
||||||
if (typeof content !== "string") {
|
if (typeof content !== "string") {
|
||||||
console.warn("[enhancement] LLM returned no content in response")
|
console.warn("[enhancement] LLM returned no content in response")
|
||||||
return null
|
return null
|
||||||
|
|||||||
Reference in New Issue
Block a user