Function
createApiErrorAssistantMessage
(
text: string,
errorDetails?: string,
)
Source from the content-addressed store, hash-verified
| 11 | import { OpenAICompatMalformedToolOutputError } from './openAICompatInferenceClient.js' |
| 12 | |
| 13 | function createApiErrorAssistantMessage( |
| 14 | text: string, |
| 15 | errorDetails?: string, |
| 16 | ): AssistantMessage { |
| 17 | return { |
| 18 | type: 'assistant', |
| 19 | isApiErrorMessage: true, |
| 20 | errorDetails, |
| 21 | uuid: 'assistant-error', |
| 22 | message: { |
| 23 | role: 'assistant', |
| 24 | content: [{ type: 'text', text }], |
| 25 | }, |
| 26 | } as AssistantMessage |
| 27 | } |
| 28 | |
| 29 | describe('api error recovery predicates', () => { |
| 30 | it('parses prompt-too-long token counts from wrapped provider messages', () => { |
Tested by
no test coverage detected