Skip to content

Add OpenAI GPT-Rosalind as the rosalind deep-research provider - #636

Merged
realmarcin merged 3 commits into
mainfrom
feat/rosalind-provider
Sep 4, 2026
Merged

Add OpenAI GPT-Rosalind as the rosalind deep-research provider#636
realmarcin merged 3 commits into
mainfrom
feat/rosalind-provider

Conversation

@realmarcin

Copy link
Copy Markdown
Contributor

Summary

Adds OpenAI GPT-Rosalind as a TraitMech deep-research provider, rosalind
(aliases gpt-rosalind, gpt_rosalind), for reviewing and constructing causal
graphs and their evidence.

GPT-Rosalind is served by the same Responses API as deep-research-client's
openai provider, so the lane is --provider openai --model $ROSALIND_MODEL
under a TraitMech-level provider name and its own filename namespace,
<slug>-deep-research-rosalind.md. The namespace is deliberately separate from
-openai: an o3-deep-research report and a GPT-Rosalind report are different
evidence and must never satisfy each other's resume check.

What changed

  • scripts/research_trait.py: rosalind provider; provider_args() emits
    --provider openai --model …; research_env() lets a dedicated
    ROSALIND_API_KEY override OPENAI_API_KEY for this lane (a
    general-purpose key must not silently take the call); research_env() now
    accepts an injected environ.
  • scripts/run_trait_graph_audit.py: provider-aware preflight (it used to demand
    EDISON_API_KEY for every provider); resume and the orphan gate honour a
    pipeline_run: false front-matter flag, which is what keeps the two
    hand-pasted Rosalind answers under research/traits/ecology/ from suppressing
    a --provider rosalind call or being reported as orphans.
  • scripts/deep_research_provider.py + conf/deep_research_provider.yaml:
    rosalind triaged and credentialed on its own, weighted like falcon for
    causal_mechanism.
  • scripts/research_rosalind_canary.py + just rosalind-canary: unbilled
    preflight. Lists the models the credential may use and fails unless the
    requested id is among them (the model is trusted-access gated per org), prints
    any Rosalind ids it does see so ROSALIND_MODEL can be corrected, then checks
    deep-research-client discovers openai under the env a real run gets.
    Lives outside deep_research_contract.py because that file is vendored.
  • scripts/render_trait_pages.py: RESEARCH_PROVIDERS = ("falcon", "rosalind")
    (no page changes: both existing Rosalind traits also have falcon reports).
  • Docs: docs/DEEP_RESEARCH_PROVIDERS.md, README, the research-causal-graphs
    skill, .env.example; the two hand-supplied reports' front matter now says why
    pipeline_run: false is load-bearing.
  • Tests for every seam above.

Verified

  • just qc green, full pytest suite green (see the PR comments for counts).
  • just research-trait ecology gut_associated --provider gpt-rosalind --dry-run
    emits --provider openai --model gpt-rosalind and the -rosalind.md path.
  • run_trait_graph_audit.py --provider rosalind --dry-run/--verify: 0 done,
    0 orphans (the two hand-supplied files are correctly excluded).
  • just rosalind-canary runs and fails cleanly on the credential check on the
    authoring machine (no Rosalind key was visible to the session).

Not verified (needs the key)

  • The exact API model id. Default is gpt-rosalind; the canary reports the
    real ids and ROSALIND_MODEL overrides. No paid call has been made.
  • Which variable carries the key: ~/.secrets held OPENAI_API_KEY at the
    start of the session and only CODEX_ACCESS_TOKEN a few minutes later.
    The lane reads ROSALIND_API_KEY first, then OPENAI_API_KEY.

🤖 Generated with Claude Code

https://claude.ai/code/session_01X8fGq86Bo7eeBoXMtiU1gg

GPT-Rosalind is served by the same Responses API as deep-research-client's
`openai` provider, so the lane is `--provider openai --model $ROSALIND_MODEL`
under a TraitMech-level provider name with its own `-deep-research-rosalind.md`
namespace: an o3-deep-research report and a GPT-Rosalind report are different
evidence and must never satisfy each other's resume check.

- research_trait: `rosalind` (+ `gpt-rosalind`, `gpt_rosalind`) resolves to
  itself; provider_args() translates for the client; a dedicated
  ROSALIND_API_KEY overrides OPENAI_API_KEY for this lane only.
- run_trait_graph_audit: provider-aware preflight (it demanded EDISON_API_KEY
  for every provider); resume and the orphan gate honour `pipeline_run: false`,
  which is what keeps the two hand-pasted Rosalind answers from suppressing a
  call or reading as orphans.
- deep_research_provider + profile: triaged and credentialed on its own,
  weighted like falcon for causal_mechanism.
- research_rosalind_canary + `just rosalind-canary`: unbilled preflight that
  lists the models the key may use and fails unless the requested id is among
  them (the model is trusted-access gated per org). Outside the vendored
  contract file on purpose.
- render_trait_pages: rank rosalind after falcon.
- Docs, .env.example, skill, and the two hand-supplied reports' front matter.

No paid call was made; the API model id defaults to `gpt-rosalind` and is
overridable via ROSALIND_MODEL until the canary confirms it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X8fGq86Bo7eeBoXMtiU1gg
Copilot AI lite review requested due to automatic review settings September 3, 2026 23:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

- #638: research_trait refuses an existing report without --force; the sweep
  sets hand-supplied targets aside instead of queueing (and overwriting) them.
- #639: the namespace test asserts the orphan-gate invariant, not "every
  rosalind file is hand-supplied", so the first real report stays green.
- #640: a passthrough --model is rejected for rosalind (ROSALIND_MODEL only).
- #641: ROSALIND_API_KEY is the lane's only credential in the runner, sweep
  preflight, triage, and canary; without it the child gets no OpenAI key.
- #642: front matter is parsed as YAML over the whole head (BOM tolerant),
  shared as research_trait.front_matter/is_pipeline_report.
- #643: the renderer excludes pipeline_run: false files; test added.
- #644: sweep docs use `just trait-graph-sweep` so .env is loaded.
- #645: canary gains --allow-unlisted and documents the request-shape gap.
- #646: sweep preflight accepts EDISON_PLATFORM_API_KEY.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X8fGq86Bo7eeBoXMtiU1gg
@realmarcin

Copy link
Copy Markdown
Contributor Author

Adversarial review: findings filed and triaged

Every finding from the review pass was filed as an issue. Disposition for this PR:

Fixed in this PR (second commit)

Deferred, left open

🤖 Generated with Claude Code

https://claude.ai/code/session_01X8fGq86Bo7eeBoXMtiU1gg

OpenAI's 401 body repeats the key as `at-Jk6S****zMaI`; the full-string
replace let that prefix and suffix through on the first live run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X8fGq86Bo7eeBoXMtiU1gg
@realmarcin
realmarcin merged commit f20b462 into main Sep 4, 2026
9 checks passed
@realmarcin
realmarcin deleted the feat/rosalind-provider branch September 4, 2026 00:17
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.

2 participants