Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

anthropic-refusal.spec.ts

16 lines517 Bytes

1import { test, expect } from './fixtures'
2​
3/**
4 * A classifier refusal that no server-side fallback served is not an error.
5 * The run finishes with the `content_filter` finish reason.
6 */
7test.describe('anthropic — refusal stop', () => {
8 test('RUN_FINISHED carries the content_filter finish reason', async ({
9 request,
10 }) => {
11 const res = await request.post('/api/anthropic-refusal')
12 const body: unknown = await res.json()
13​
14 expect(body).toMatchObject({ finishReason: 'content_filter' })
15 })
16})