fix: Update default chat model to grok-4-1-fast-reasoning and enhance logging for LLM responses
This commit is contained in:
@@ -317,6 +317,18 @@ async def invoke_and_format_response(
|
||||
"total_tokens": getattr(u, 'input_tokens', 0) + getattr(u, 'output_tokens', 0)
|
||||
}
|
||||
|
||||
# Log complete LLM response
|
||||
ctx.logger.info("=" * 80)
|
||||
ctx.logger.info("📤 LLM RESPONSE")
|
||||
ctx.logger.info("-" * 80)
|
||||
ctx.logger.info(f"Model: {model_name}")
|
||||
ctx.logger.info(f"Completion ID: {completion_id}")
|
||||
ctx.logger.info(f"Usage: {usage['prompt_tokens']} prompt + {usage['completion_tokens']} completion = {usage['total_tokens']} total tokens")
|
||||
ctx.logger.info("-" * 80)
|
||||
ctx.logger.info("Content:")
|
||||
ctx.logger.info(content)
|
||||
ctx.logger.info("=" * 80)
|
||||
|
||||
# Format OpenAI-compatible response
|
||||
response_body = {
|
||||
'id': completion_id,
|
||||
|
||||
Reference in New Issue
Block a user