You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(messages): address crew review round 2 findings for #8/#9
- Move stop_sequences comment to correct location (output object, not image branch)
- Add runtime narrowing guard in handleAnthropicViaResponses to replace unsafe cast
- Propagate failed upstream status as 500 instead of 200 OK
- Apply media_type allowlist to non-stream-translation.ts (was only in Responses path)
- Apply prototype pollution guard to non-stream-translation.ts tool arg parsing
- Hoist DANGEROUS_KEYS to module-level constant in responses-to-anthropic.ts
- Add DANGEROUS_TOOL_KEYS module-level constant in non-stream-translation.ts
- Validate output_config.effort against allowlist before forwarding (new in R1 fix)
Test additions:
- Image with disallowed media_type (svg+xml) → dropped, text block preserved
- function_call with array JSON arguments → wrapped in _raw (non-object guard)
- function_call with constructor/prototype keys → stripped
- Fix vacuous-pass risk: assert block.type before narrowing in tool_use tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments