Creates detailed empty response error for LLM providers.
// Source: https://github.com/MoonshotAI/kimi-code | License: MIT | Copyright 2026 Moonshot AI
// Provided via justclaw.it.com; keep this notice with the code.
import type { LlmErrorMessage } from '#/llm/errors';
import type { FinishInfo } from '#/llm/finish-reason';
import type { AssistantMessage } from '#/llm/message';
import type { LlmModel } from '#/llm/model';
function formatFinishReasonHint(finish: FinishInfo): string {
if (finish.finishReason === null && finish.rawFinishReason === null) return '';
const raw =
finish.rawFinishReason === null ? '' : `, rawFinishReason=${finish.rawFinishReason}`;
const filteredHint =
finish.finishReason === 'filtered'
? ' The provider filtered the response before visible output was emitted.'
: '';
return ` Provider stop det
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key