Skip to content

[FEATURE]: Add safety_identifier parameter support for OpenAI GPT-5.3-Codex to prevent cyber_policy_violation errors #15776

@nulluserid

Description

@nulluserid

Problem

I received this error in the OpenCode TUI when using GPT-5.3-Codex via Oh My Opencode plugin:

I got this error: {"type":"error","sequence_number":2,"error":{"type":"invalid_request","code":"cyber_policy_violation","message":"This user's access to gpt-5.3-codex-premium-1p-codexswic-ev3 has been temporarily limited for potentially suspicious activity related to cybersecurity. Learn more about our safety mitigations: https://platform.openai.com/docs/guides/safety-checks/cybersecurity","param":"safety_identifier"}}

Note: This is a streaming event error (note sequence_number field), not a standard HTTP error response.

My Environment

  • OpenCode version: 1.2.15
  • Oh My Opencode plugin: Using model alias gpt-5.3-codex (configured in plugin), which maps to OpenAI's internal model gpt-5.3-codex-premium-1p-codexswic-ev3
  • Provider: OpenAI direct

Verification

  • I have searched for existing issues before submitting this feature request

Feature Request

Add optional safety_identifier parameter support to OpenAI provider configuration for per-user isolation of safety enforcement.

Why This Matters

Per OpenAI's cybersecurity documentation:

"If your organization has not implemented a per-user safety_identifier, access may be temporarily revoked for the entire organization. If your organization provides a unique safety_identifier per end user, access may be temporarily revoked for the specific affected user rather than the entire organization."

Important clarification: The safety_identifier parameter is optional — its absence does not cause the cyber_policy_violation error. The restriction is applied by OpenAI's safety systems based on usage patterns. However, without safety_identifier:

  • One user's restricted activity can affect the entire organization
  • All users lose GPT-5.3-Codex access when any user triggers safeguards

With safety_identifier:

  • Only the specific affected user is restricted
  • Other users can continue using the model

Implementation Request

  1. Add optional safetyIdentifier field to OpenAI provider configuration
  2. Pass it in OpenAI API calls when configured (both chat.completions and responses endpoints)
  3. Allow auto-generation from hostname+username hash as a default if not explicitly configured

This is supported in OpenAI SDKs including the Go SDK (v3.22.1+).

Related

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions