Log every server-side safety fallback step on OpenCode 1 and 2

Draft
AN
18h ago
+354-96

Refs #861 (part A). One INFO line per served fallback step with per-attempt token counts (no content); OpenCode 2 previously logged nothing, OpenCode 1 only the first handoff. Notice text no longer claims follow-ups stay on the fallback model.


Summary by cubic

Logs every Anthropic server-side safety fallback step on OpenCode 1 and 2, with per-attempt token counts and stop reason but no response content. OpenCode 2 previously logged nothing; OpenCode 1 only logged the first handoff.

  • Each served fallback step now emits an INFO record on the server-fallback channel with requested and served model IDs, handoff flag, stop reason, and per-attempt token counts.
  • Logged metadata is validated and bounded so untrusted usage fields can't inflate or poison the log.
  • The fallback notice text now says the next step retries the requested model instead of claiming follow-ups stay on the fallback model.