Skip to content

feat(providers): add OPENAI_DAYBREAK to send access_programs.cyber - #13854

Merged
jamadeo merged 2 commits into
mainfrom
duncan/openai-daybreak
Nov 30, 2026
Merged

jamadeo merged 2 commits into
mainfrom
duncan/openai-daybreak

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes: #13826

Summary

Adds OPENAI_DAYBREAK, following the design agreed on the issue. When it's true (env first, then config.yaml), the built-in OpenAI provider sends access_programs: {"cyber": <value>} on every request, with the value picked from the model. When it's unset or false, nothing is sent.

It works like OPENAI_STORE: apply_openai_request_params adds access_programs to the model's request_params. When the setting is off, or the model isn't in the table, it removes the key instead, so saved and resumed sessions stop sending it. The function now takes the Config as an argument, so tests can give it an isolated config.yaml.

The value comes from the model table in OpenAI's Daybreak guide, kept in one function, daybreak_access_program. It matches the model name exactly, ignoring case, after removing any effort suffix (gpt-6.1-sol-high → gpt-6.1-sol):

Model access_programs.cyber
gpt-6-sol, gpt-6-luna, gpt-6-astra, gpt-6.1-sol, gpt-6.1-terra, gpt-6.2-sol, gpt-6.2-astra daybreak_blue
gpt-6-cyber, gpt-5.6-cyber, gpt-5.5-cyber-preview daybreak_red
any other model (gpt-4o, gpt-5, ...) no field

The guide says to send the value listed for the model even when the org has a higher approval level (for example, gpt-6.1-sol rejects daybreak_red), so each model gets exactly one value. A new model, or a dated snapshot name, needs its own entry in the table.

Which requests get it:

  • Built-in OpenAI provider only. apply_openai_request_params runs only when the provider is openai.
  • Streaming and non-streaming. Both use the same Responses request builder, which copies unknown request_params into the body, so oi-kit doesn't change.
  • Subagents. A subagent on a different model is configured through model_config_from_user_config_with_session_settings, which picks the value for its own model. access_programs isn't one of the settings a subagent copies from its parent session.
  • Background requests. Compaction, session naming and tool-call labels use the session's model config through complete_one_shot.

Docs: an OPENAI_DAYBREAK row next to OPENAI_STORE in providers.md, linking the guide.

Testing

cargo fmt --check, cargo clippy -p goose --all-targets -- -D warnings, and cargo test -p goose --lib model_config (34 passed). The tests in model_config::daybreak_tests:

  • On: each model gets the right value, including effort-suffixed names (gpt-6.1-sol-high, gpt-6-cyber-xhigh) and mixed case (GPT-6-Cyber).
  • Off and unset: no field. These tests read an isolated temp config.yaml, so the machine's own goose config can't affect them.
  • On with gpt-4o or gpt-5: no field.
  • On, then off on a saved config: the field is removed.
  • Env through to the request body: OPENAI_DAYBREAK=true in env, through materialize_model_config, to the body built by create_responses_request.
  • Other providers: no field.
  • Subagents: with a gpt-6.1-sol parent, a gpt-6-cyber subagent gets daybreak_red and a gpt-4o subagent gets no field.

The live check from the issue's verification plan is still to do: run with a Daybreak key, and confirm that a mismatched value returns 400 invalid_access_program, which proves the field is sent. We'll post the result here.

When OPENAI_DAYBREAK is true, the built-in OpenAI provider adds
access_programs.cyber to every request, with the value picked from the
model per OpenAI's Daybreak guide. Models outside the table get no
field, and turning the setting off removes it from saved sessions.

Fixes #13826

Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview deployed: https://pr-13854.goose-pr-previews-poc.pages.dev

…_DAYBREAK

Match Daybreak models case-insensitively, pass the config into
apply_openai_request_params so tests can use an isolated config.yaml,
and add tests for effort-suffixed names and cross-family subagents.

Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
@wpfleger96
wpfleger96 force-pushed the duncan/openai-daybreak branch from 338d447 to e4050c8 Compare November 26, 2026 21:57
@wpfleger96
wpfleger96 marked this pull request as ready for review November 27, 2026 16:41
@wpfleger96
wpfleger96 requested a review from a team as a code owner November 27, 2026 16:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T16:43:55.911557Z e4050c8 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jamadeo
jamadeo added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 09f368c Nov 30, 2026
48 of 49 checks passed
@jamadeo
jamadeo deleted the duncan/openai-daybreak branch November 30, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAI provider: send access_programs.cyber for Daybreak project keys

3 participants