Type Alias LlmStreamProtocolCode
LlmStreamProtocolCode:
| "AMC_LLM_STREAM_CHUNK_AFTER_TERMINATION"
| "AMC_LLM_STREAM_BLOCK_INDEX_INVALID"
| "AMC_LLM_STREAM_BLOCK_REOPENED"
| "AMC_LLM_STREAM_DELTA_WITHOUT_BLOCK"
| "AMC_LLM_STREAM_DELTA_KIND_MISMATCH"
| "AMC_LLM_STREAM_BLOCK_END_UNOPENED"
| "AMC_LLM_STREAM_BLOCK_END_KIND_MISMATCH"
| "AMC_LLM_STREAM_TOOL_CALL_ID_EMPTY"
| "AMC_LLM_STREAM_TOOL_CALL_ID_CHANGED"
| "AMC_LLM_STREAM_USAGE_REPEATED"
| "AMC_LLM_STREAM_USAGE_INVALID"
| "AMC_LLM_STREAM_USAGE_MISSING"
| "AMC_LLM_STREAM_OPEN_BLOCK_AT_FINISH"
| "AMC_LLM_STREAM_NOT_TERMINATED"
Every way an adapter can break the stream contract.
AMC_-prefixed, unlike the provider failure codes in llmFailure.ts, and the prefix carries meaning: these are AMC's own contract violations — a bug in an adapter — not facts about what a provider did. Nothing here is ever eligible for a retry policy, because repeating a request cannot fix code that emits an illegal chunk order.One code per rule, never one code for two rules: a shared code would let a deleted rule stay green under the other rule's test, which is exactly how a check becomes decorative.