Kind: Class
Source: atloria-monorepo/packages/doc-automation/src/v2/providers/claude.provider.ts
Implements: AIProvider
Methods
| Method | Signature | Returns |
|---|---|---|
generate | generate(prompt: string, options: ClaudeGenerateOptions, stage: JobStage) | Promise<ClaudeResponse> |
generateWithStreaming | generateWithStreaming(prompt: string, options: ClaudeGenerateOptions, stage: JobStage) | Promise<ClaudeResponse> |
generateText | generateText(prompt: string, options: Omit<ClaudeGenerateOptions, 'messages'>, stage: JobStage) | Promise<string> |
generateJSON | generateJSON(prompt: string, options: ClaudeGenerateOptions, stage: JobStage) | Promise<{ data: T; response: ClaudeResponse }> |
generateWithStructuredOutput | `generateWithStructuredOutput(options: { |
prompt: string; schema: object; model?: string; maxTokens?: number;
})|Promise<{ content: T; usage: { inputTokens: number; outputTokens: number } }>| |isAvailable|isAvailable()|Promise| |getThrottlingStatus|getThrottlingStatus()|{ consecutiveFailures: number; adaptiveDelayMs: number; lastFailureTime: number }` |
Properties
| Property | Type |
|---|---|
name | any |
Where it refuses work
ClaudeProviderstops the work withErrorwhen!config.azureEndpoint && !config.anthropicApiKey— “Claude provider requires either azureEndpoint or anthropicApiKey”.ClaudeProviderstops the work withErrorwhenconfig.azureEndpoint && !config.azureApiKey && !config.azureAccessToken— “Azure Claude requires either azureApiKey or azureAccessToken”.ClaudeProviderstops the work with an early return whenerror instanceof AIProviderError.
When something fails
ClaudeProviderhandles failure in 6 places: it logs it and continues in 3, lets it reach the caller in 2, and turns it into a return value in 1.
Was this page helpful?