mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-16 12:12:23 +03:00
Claude Code always sends a top-level `context_management` field. Strict anthropic-compatible gateways reject it with 400 "context_management: Extra inputs are not permitted". The dedicated context-editing 400-fallback in base.ts only fires when OmniRoute's own `contextEditing` feature is enabled (default off), so a client-sent field passed through untouched and 400'd with no recovery. Add `context_management` to KNOWN_OFFENDING_FIELDS so the generic reactive 400 field-downgrade strips-and-retries it once, independent of the feature flag (the generic path already re-signs for claude-compatible relays). Regression guard: tests/unit/provider-field-strips.test.ts. Reported-by: ohahe52-dot (https://github.com/decolua/9router/issues/1468)