Skip to content

feat(harness-server): add cyber policy model fallback - #1582

Open
decofe wants to merge 1 commit into
mainfrom
centaur/autoswitch-cybersecurity-fallback-1788260061
Open

feat(harness-server): add cyber policy model fallback#1582
decofe wants to merge 1 commit into
mainfrom
centaur/autoswitch-cybersecurity-fallback-1788260061

Conversation

@decofe

@decofe decofe commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Retry a Codex turn once with CODEX_CYBER_POLICY_FALLBACK_MODEL when the selected model returns a cybersecurity-policy rejection before streaming work.
  • Recognize the typed cyberPolicy error and the legacy high-risk-cyber message while preserving the original failure when no distinct fallback is configured.
  • Add unit and fake app-server integration coverage for the model switch.

Testing

  • cargo test --manifest-path crates/harness-server/Cargo.toml
  • cargo +nightly clippy --manifest-path crates/harness-server/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path crates/harness-server/Cargo.toml real_codex_long_streaming_uses_native_app_server_chunks -- --ignored --nocapture

Prompted by: @Zygimantass

Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants