- Exclude content/safety refusals from the failover-health score so repeated
refusals of one prompt no longer trip a healthy profile's circuit breaker
(RecordCall: neutral — no Trip, no Pass).
- Match specific provider refusal codes (cyber_policy, content_policy_violation,
invalid_prompt, Azure content_filter) instead of loose words; drop the bare
'safety' marker that caught OpenAI safety_identifier / Gemini safety_settings.
- Refresh the stale shouldFailover doc comment.
- Add tests (shouldFailover code matrix, RecordCall refusal-neutrality) and a
CHANGELOG entry.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
trimErr cut the error text at byte 300, which can split a multi-byte
character. The result is stored as llm_profile_health.last_error, and
PostgreSQL rejects the invalid UTF-8, so the breaker state of a profile
whose provider answers in Chinese is never persisted and the write is
retried every second.