mirror of
https://github.com/openai/codex.git
synced 2026-11-30 00:10:49 +00:00
Expose Daybreak availability in model discovery (#62499)
## Why Clients need to distinguish a caller who must enroll in Daybreak from a model that does not support it. The list of accepted access programs alone cannot express that distinction. ## What changed Carry the server-resolved status for each caller and model from the model catalog into `model/list` as `availableAccessPrograms.daybreakAvailability`. Update the JSON schemas, TypeScript bindings, and Python SDK to expose the field. Rust decoders use `default` for missing or unrecognized statuses. The Python SDK also defaults missing statuses and preserves new strings from newer hosts. ## Testing Cover catalog decoding, app-server response serialization, and Python SDK round trips with known, missing, and future status values. GitOrigin-RevId: c1e5ddef68fd19b25e583bb6996a93fd78ab9d18
This commit is contained in:
committed by
copyberry
parent
b0ecad9cf9
commit
1826d80eca
@@ -1214,6 +1214,22 @@ class CyberAccessProgram(Enum):
|
||||
daybreak_red = "daybreakRed"
|
||||
|
||||
|
||||
class DaybreakAvailability(str, Enum):
|
||||
available = "available"
|
||||
enrollment_required = "enrollmentRequired"
|
||||
unavailable_for_model = "unavailableForModel"
|
||||
default = "default"
|
||||
|
||||
@classmethod
|
||||
def _missing_(cls, value: object) -> DaybreakAvailability | None:
|
||||
if not isinstance(value, str) or not value:
|
||||
return None
|
||||
member = str.__new__(cls, value)
|
||||
member._name_ = value
|
||||
member._value_ = value
|
||||
return member
|
||||
|
||||
|
||||
class DeprecationNoticeNotification(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@@ -2936,6 +2952,13 @@ class ModelAccessPrograms(BaseModel):
|
||||
populate_by_name=True,
|
||||
)
|
||||
cyber: Annotated[list[CyberAccessProgram], Field(description="Accepted explicit selections.")]
|
||||
daybreak_availability: Annotated[
|
||||
DaybreakAvailability | None,
|
||||
Field(
|
||||
alias="daybreakAvailability",
|
||||
description="Server-resolved Daybreak availability for this caller and model.",
|
||||
),
|
||||
] = "default"
|
||||
|
||||
|
||||
class ModelAvailabilityNux(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user