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:
igorrybalka-oai
2026-11-19 12:28:34 +00:00
committed by copyberry
parent b0ecad9cf9
commit 1826d80eca
31 changed files with 393 additions and 39 deletions
@@ -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):