mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-23 10:31:18 +00:00
fix(backend): disable reasoning and fallback to reasoning field
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,
|
||||
},
|
||||
},
|
||||
reasoning: { effort: "none" },
|
||||
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") {
|
||||
console.warn("[enhancement] LLM returned no content in response")
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user