mirror of
https://github.com/openai/codex.git
synced 2026-09-16 12:13:30 +00:00
Expose available access programs in model discovery (#44893)
## What changed Carry optional `available_access_programs` metadata through model information, presets, caches, and the TUI, and expose it as `availableAccessPrograms` in app-server `model/list` responses. Update the generated JSON schemas, TypeScript types, and Python models. Preserve the distinction between missing metadata and an empty `cyber` list. Ignore unknown cyber program names when reading the catalog so new server programs do not prevent older clients from loading it. Discovery metadata does not grant access; inference still enforces authorization. ## Testing Add coverage for absent, null, empty, and populated metadata, unknown program names, and app-server serialization. Extend cache tests and verify that online refreshes persist changed access metadata even when the catalog ETag stays unchanged. GitOrigin-RevId: b3ef5805c1c61b8d64b9b896c9c0a79120143667
This commit is contained in:
@@ -2700,6 +2700,13 @@ class ModeKind(Enum):
|
||||
default = "default"
|
||||
|
||||
|
||||
class ModelAccessPrograms(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
)
|
||||
cyber: Annotated[list[CyberAccessProgram], Field(description="Accepted explicit selections.")]
|
||||
|
||||
|
||||
class ModelAvailabilityNux(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@@ -8415,6 +8422,13 @@ class Model(BaseModel):
|
||||
Field(alias="additionalSpeedTiers", description="Deprecated: use `serviceTiers` instead."),
|
||||
] = []
|
||||
availability_nux: Annotated[ModelAvailabilityNux | None, Field(alias="availabilityNux")] = None
|
||||
available_access_programs: Annotated[
|
||||
ModelAccessPrograms | None,
|
||||
Field(
|
||||
alias="availableAccessPrograms",
|
||||
description="Null when the catalog does not provide access-program metadata.",
|
||||
),
|
||||
] = None
|
||||
default_reasoning_effort: Annotated[ReasoningEffort, Field(alias="defaultReasoningEffort")]
|
||||
default_service_tier: Annotated[
|
||||
str | None,
|
||||
|
||||
Reference in New Issue
Block a user