mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +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
@@ -151,7 +151,10 @@ mod tests {
|
||||
model.available_access_programs = None;
|
||||
assert_eq!(select_program(&model, SavedDaybreakChoice::Off), Ok(None));
|
||||
for cyber in [vec![], vec![CyberAccessProgram::DaybreakRed]] {
|
||||
model.available_access_programs = Some(ModelAccessPrograms { cyber });
|
||||
model.available_access_programs = Some(ModelAccessPrograms {
|
||||
cyber,
|
||||
daybreak_availability: Default::default(),
|
||||
});
|
||||
assert_eq!(select_program(&model, SavedDaybreakChoice::Unset), Ok(None));
|
||||
assert!(
|
||||
select_program(&model, SavedDaybreakChoice::Off)
|
||||
|
||||
@@ -154,6 +154,7 @@ async fn paused_helpers(
|
||||
model.available_access_programs =
|
||||
Some(codex_protocol::openai_models::ModelAccessPrograms {
|
||||
cyber: programs.clone(),
|
||||
daybreak_availability: Default::default(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user