MCPcopy Create free account
hub / github.com/Noumena-Network/code / createApiErrorAssistantMessage

Function createApiErrorAssistantMessage

src/services/api/errors.test.ts:13–27  ·  view source on GitHub ↗
(
  text: string,
  errorDetails?: string,
)

Source from the content-addressed store, hash-verified

11import { OpenAICompatMalformedToolOutputError } from './openAICompatInferenceClient.js'
12
13function 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
29describe('api error recovery predicates', () => {
30 it('parses prompt-too-long token counts from wrapped provider messages', () => {

Callers 1

errors.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected