mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
Expose bioPolicy errors in app-server v2 (#62176)
## Why App-server clients received the generic `other` error code for biology policy errors, so they couldn't distinguish them by code. ## What changed Map the core `BioPolicy` error to `bioPolicy` in app-server v2 and include the new value in the generated JSON schemas, TypeScript types, and Python SDK enum. ## Testing Update the error conversion test to assert that `BioPolicy` serializes as `"bioPolicy"`. GitOrigin-RevId: 77fa969a3d8cbd4c12fe6f7aa5d4833f6adaa99b
This commit is contained in:
@@ -886,6 +886,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
+1
@@ -9133,6 +9133,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
+1
@@ -4887,6 +4887,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -347,6 +347,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -269,6 +269,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
+1
@@ -269,6 +269,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -269,6 +269,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -347,6 +347,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -269,6 +269,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
+1
@@ -269,6 +269,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -347,6 +347,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -269,6 +269,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -269,6 +269,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
"modelNotFound",
|
||||
"policyCapacityUnavailable",
|
||||
"cyberPolicy",
|
||||
"bioPolicy",
|
||||
"misalignmentPolicyViolation",
|
||||
"tooManyDenials",
|
||||
"internalServerError",
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -9,4 +9,4 @@ import type { NonSteerableTurnKind } from "./NonSteerableTurnKind";
|
||||
* When an upstream HTTP status is available (for example, from the Responses API or a provider),
|
||||
* it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.
|
||||
*/
|
||||
export type CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "rateLimitExceeded" | "flexUnavailable" | "serverOverloaded" | "modelNotFound" | "policyCapacityUnavailable" | "inferenceHookDenied" | "cyberPolicy" | "misalignmentPolicyViolation" | "tooManyDenials" | { "httpConnectionFailed": { httpStatusCode: number | null, } } | { "responseStreamConnectionFailed": { httpStatusCode: number | null, } } | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | { "responseStreamDisconnected": { httpStatusCode: number | null, } } | { "responseTooManyFailedAttempts": { httpStatusCode: number | null, } } | { "activeTurnNotSteerable": { turnKind: NonSteerableTurnKind, } } | "other" | string | { [key: string]: unknown };
|
||||
export type CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "rateLimitExceeded" | "flexUnavailable" | "serverOverloaded" | "modelNotFound" | "policyCapacityUnavailable" | "inferenceHookDenied" | "cyberPolicy" | "bioPolicy" | "misalignmentPolicyViolation" | "tooManyDenials" | { "httpConnectionFailed": { httpStatusCode: number | null, } } | { "responseStreamConnectionFailed": { httpStatusCode: number | null, } } | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | { "responseStreamDisconnected": { httpStatusCode: number | null, } } | { "responseTooManyFailedAttempts": { httpStatusCode: number | null, } } | { "activeTurnNotSteerable": { turnKind: NonSteerableTurnKind, } } | "other" | string | { [key: string]: unknown };
|
||||
|
||||
Reference in New Issue
Block a user