Repository navigation
Conversation
…ests
Saved model aliases accept an optional accessPrograms: { cyber } field
(standard | daybreak_blue | daybreak_red). Requests routed through that
alias add access_programs.cyber to the OpenAI Responses body, on both the
ChatGPT/Codex OAuth WebSocket transport and the API-key HTTP route.
Invalid or missing values omit the field entirely (the API rejects null),
and the canonical clodex: id and other aliases of the same model are
unaffected.
Owner
|
Thank you for this. It's a feature we wanted, and your live observations held up: on our account gpt-5.6-sol accepts We're closing it in favor of #327, which ships the same capability with a different design. Reviewing this PR is what led us there:
Your fetch wrapper is reused in #327 essentially as you wrote it, and the PR credits you. Thanks again for the groundwork. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenAI's Responses API added an optional
access_programsobject to select a cybersecurity access program per request (access_programs.cyber:standard|daybreak_blue|daybreak_red, see https://developers.openai.com/api/docs/guides/daybreak). Some prompts fail on Daybreak-eligible models unless the program is selected, and the right value is model- and account-specific (e.g. on one ChatGPT account gpt-5.6-sol acceptsdaybreak_blue, rejectsdaybreak_redwith a 400 naming the right value, and gpt-6.1-sol rejects Daybreak with a 403), so a global switch doesn't work.This adds an optional per-alias setting in
~/.clodex/config.json:{ "name": "sol", "providerId": "openai-oauth", "modelId": "gpt-5.6-sol", "accessPrograms": { "cyber": "daybreak_blue" } }null).clodex:id and other aliases of the same model are unchanged.src/access-programs.ts).clodex models.Tests: unit tests for validation/merge/fetch wrapper and alias normalization; a proxy test checking
createLanguageModelreceivesaccessProgramsonly for the configured alias; a provider-factory test checking the OAuth WebSocket payload carriesaccess_programsonly when configured.pnpm testandtsc --noEmitpass.Verified live against
chatgpt.com/backend-api/codex: an alias set todaybreak_blueon gpt-5.6-sol → 200;daybreak_red→ 400 "The selected model requires a different Daybreak access program. Set access_programs.cyber to daybreak_blue and try again."; unconfigured aliases unchanged.Known limitation:
clodex models --aliasrewrites the alias and drops the setting (documented).