Skip to content

Research runtime: GPT Researcher's effort rides on each alias, FAST stays -high (stacked on #759) - #774

Draft
seathatflowsinourveins wants to merge 6 commits into
mainfrom
claude/ns2604-gptr-effort-20261006
Draft

seathatflowsinourveins wants to merge 6 commits into
mainfrom
claude/ns2604-gptr-effort-20261006

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

The ruling. The command center's item task-ns2604-coop-20261006T043449Z, section 4: FAST keeps -high, per docs/decisions/2026-10-04-round2-plan-g4-config.md:66 and docs/decisions/2026-10-05-round2-adoption-repair.md:53. The effort each request sends must agree with its alias.

The finding. In the 24 h before this change (2026-10-05T04:45:27Z to 2026-10-06T04:45:27Z), the gateway's call_logs held at least 12 rows whose requested and upstream efforts differed. All of them were GPT Researcher sessions (gptr-*) on codex/gpt-6.1-sol-high: requested xhigh, upstream high. The count is a lower bound, because both effort columns are filled only for encrypted-reasoning rows.

SOTA sources

  • assafelovic/gpt-researcher@0957c301 (v3.7.0, identical to main) has no per-role kwargs mechanism:
    • gpt_researcher/config/variables/base.py L35 and L46: one LLM_KWARGS and one REASONING_EFFORT;
    • gpt_researcher/config/config.py L97: REASONING_EFFORT is read from the environment only;
    • config.py L225-231: only high, medium or low are accepted;
    • config.py L205-222: parse_llm splits provider:model only;
    • gpt_researcher/utils/llm.py L86-87: an effort is sent only for SUPPORT_REASONING_EFFORT_MODELS (llm_provider/generic/base.py L77-90 lists no gpt-6.1 model);
    • utils/llm.py L103-104: LLM_KWARGS is merged into every call.
  • diegosouzapw/OmniRoute:
    • @c1e30b76:open-sse/executors/codex.ts#L1401-L1408 split the suffix. #L1428-L1433 resolve the effort as forced, then the model suffix, then reasoning.effort, then reasoning_effort. The file is byte-identical at PR 15167's head 0585aba55 and in the running 21128 build 5f4b3d577 (docs/decisions/2026-10-05-omniroute-gateway-composition.md L9-34).
    • @0585aba55:open-sse/executors/codex/reasoningSuffix.ts#L54-L58 parse the hyphen suffixes through xhigh. The v3.8.51 tag has the same loop at L52-56, but its live catalog rejects gpt-6.1-sol-xhigh (composition decision L49-51 and L88-90; evidence/artifacts/omniroute-sol-max-20260930/checks/probe-gate-before-switch.json).
    • @c1e30b76:open-sse/config/providers/registry/codex/index.ts#L9-L13 (provider id codex, alias cx) and open-sse/services/model.ts#L484-L490. src/lib/usage/callLogs.ts#L221-L231, #L479: the call-log API rewrites only provider-node prefixes, so a cx/ request comes back as codex/.
    • callLogs.ts#L649-L668 and migration 188_call_logs_reasoning_encrypted.sql#L13-L14 (identical at 0585aba55): reasoning_effort_requested is the client body's effort verbatim, and reasoning_effort_upstream is the effort the gateway sent. Both are filled only when the reasoning is observed as encrypted (L661-668).
  • Alternatives weighed:
    • a per-role kwargs route in GPT Researcher: none at the pin;
    • keeping the plain smart/strategic route with a body xhigh and changing only FAST: impossible, because one LLM_KWARGS reaches every role;
    • raising FAST to xhigh: contrary to the ruling and both decision records;
    • REASONING_EFFORT: environment-only, low/medium/high only, and never applied to gpt-6.1 models;
    • restoring session 80's measured -max for smart and strategic, which the PR 15167 build also serves: not taken. The ruling concerns agreement between effort and alias, not the level, and the recorded decisions keep smart/strategic at xhigh and give Sol/max to native Codex alone (docs/decisions/2026-10-04-final-architecture-round2.md:38; 2026-10-05-round2-adoption-repair.md:52-54). This would be overturned by a paired research-quality A/B of -max against -xhigh on frozen queries, through promptfoo, showing better reports at acceptable latency and cost, followed by a dated decision that amends the native-Codex-only Sol/max rule.

Evidence-class table

Claim Evidence class Command / receipt
In run 20261006T044527Z-3989681, no request asked for xhigh on a -high alias, and every request's upstream effort equals its alias suffix native_proven bash tools/research/gpt_researcher.sh "NTP leap smear guidance 2026" with wrapper sha256 fbf0f46a42f1489193a0b190b284944b65ce0cecd975e85eb370a8bfccd23311 and config 8edd67475f0e7f80057a5dbefadfee3af558ceceba7ab4d48a5d4145157ab50b, byte-identical at this head. 04:45:27Z-04:51:31Z, exit 0, sources_count: 12. Gateway call_logs read with sqlite3 mode=ro, session_tag = gptr-20261006T044527Z-3989681: 4 rows, table below. This covers that run only; the 24 h re-measure is owed after the reinstall
The plan's acceptance script accepts the run's routes as the API reports them native_proven python3 evidence/artifacts/new-wsl-install-plan-20261002/config/gateway-effort-accept.py gptr-20261006T044527Z-3989681 2026-10-06T04:45:27Z 2026-10-06T04:51:31Z at 05:55:54Z: exit 0, join=session, expected effort high and xhigh. The API rows read requestedModel codex/gpt-6.1-sol-xhigh (3) and codex/gpt-6.1-sol-high (1), provider codex. Control on the same live session: main's script (31eeb4c4…) and this branch's first one (1bf7c2bf…) exit 1
The acceptance script's predicate accepts the observed shape and rejects mismatches synthetic tests.test_new_wsl_client_config Round2RepairIntegrationTests: 10 OK. Rows are shaped like the live ones; negatives cover an alias that differs from the model, provider openai and -max. Against main's and the first script, the test raises "unexpected model route" (exit 1)
The preflight enforces the exact contract local_integration tests.test_research_entry: 11 OK. Controls: a mutant with the effort check disarmed fails exactly the 2 new effort cases; #759's wrapper against the new config fails 18 checks with 1 error
The config bytes are bound by a dated amendment chained to the 2026-10-05 record local_integration The configuration test (configuration_sha256, previous_configuration_sha256, superseded_by/amends, each changed and kept field); python3 scripts/validate.py exit 0

The call_logs rows of run 20261006T044527Z-3989681:

requested_model Rows reasoning_effort_requested (body) reasoning_effort_upstream Status
codex/gpt-6.1-sol-xhigh (smart, strategic) 3 NULL xhigh 200
codex/gpt-6.1-sol-high (fast) 1 NULL high 200

"Requested" now means the alias. GPT Researcher sends no body effort, so reasoning_effort_requested is NULL on every row: these rows are encrypted-reasoning rows, the only kind for which the gateway fills both effort columns. The requested effort is the alias suffix, and the upstream effort equals it on all four rows. Before this change, FAST rows read requested xhigh, upstream high.

The receipt is the run directory on this host (report sha256 bb76fc88da36a4b7338f7ca5d35602b307fa450460cc64d4c1bd130a6575c11b, config.json b91a6515…, wrapper-stdout.log f8a0cc08…) plus this stdout tail (home shortened to ~):

Task title: NTP Leap Smear 2026  ->  filename stem: NTP_Leap_Smear_2026
Report written to 'outputs/NTP_Leap_Smear_2026.md'
run directory: ~/.local/state/new-wsl-native-stack/research/gptr/20261006T044527Z-3989681
sources_count: 12

Local commands run

# review round, at e16ece00
$ bash -n tools/research/gpt_researcher.sh                                         -> 0
$ python3 -m unittest -v tests.test_research_entry                                 -> 0 (11 tests)
$ python3 -m unittest tests.test_research_entry tests.test_new_wsl_client_config   -> 0 (198 tests)
$ gateway test against main's and the first script (the controls above)            -> 1 and 1, as designed
$ gateway-effort-accept.py <the run's session and window>, live                    -> 0 (main's and the first script: 1)
$ bash tools/research/gpt_researcher.sh --preflight-only                           -> 0
$ python3 scripts/validate.py                                                      -> 0 (after re-registration)
$ (eight neighbouring test modules)                                                -> 0 (810 tests, 23 skipped)
# first round, at 640a7192 (the review head)
$ the disarmed-effort mutant; the #759-wrapper control                             -> 1 and 1, as designed
$ bash tools/research/gpt_researcher.sh "NTP leap smear guidance 2026"             -> 0 (sources_count: 12)

Decision record

The dated amendment repair_round_4.research_configuration_amendment_2026_10_06 in evidence/artifacts/final-architecture-round2-20261004/integration-resolutions.json, which pins the config hash. It holds the ruling, the finding, the changes, the per-role source review, the observation and its live acceptance check, the PR 15167 dependency (merge after #723), the -max alternative with its overturn comparison, and the owed re-measure. Dated notes sit in both decision records, the plan row's notes and SOURCES.md.

Host evidence

Not applicable.

Checklist

  • No workflow changes.
  • No secrets: the runtime keeps env -i and the keyless loopback placeholder; the gateway's database and call-log API were only read.
  • No new paid surface.
  • Plan files are shared with Repair native install-plan acceptance after the hcom relaxation #723, both the co-op's lanes, and settled by merge order (above). manifests/evidence.json changes only by re-registering this branch's five hash-listed files.

After landing (after #759 and #723), and only at a quiet point agreed with the command center:

  1. The co-op reinstalls the research-harnesses row: install.sh L911 copies the wrapper and its config, and L930 copies gateway-effort-accept.py. The shared main checkout is refreshed.
  2. Owed: re-measure 24 h of call_logs, expecting zero gptr-* rows whose requested effort differs from upstream (item task-ns2604-coop-20261006T033237Z, section 2). Until the reinstall, installed copies keep sending the 2026-10-05 configuration.

🤖 Generated with Claude Code

@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Oct 6, 2026
seathatflowsinourveins added a commit that referenced this pull request Oct 6, 2026
… the PR 15167 dependency, -max alternative, owed re-measure

The command center's verdict on 640a719 (ACK_AFTER; item
task-ns2604-coop-20261006T055125Z).

P2-1. The call-log API returns requestedModel under the provider id
codex/, not the requested cx/ alias: OmniRoute@c1e30b76
src/lib/usage/callLogs.ts L221-231 and L479 rewrite only provider-node
prefixes. Live rows for gptr-20261006T044527Z-3989681 read
codex/gpt-6.1-sol-xhigh, provider codex.
- gateway-effort-accept.py: ROUTES now holds the cx/ and codex/ spelling
  of each route (plain and -high as #723 adds them, plus -xhigh). It uses
  #723's stricter predicate (alias suffix equals the logged model; provider
  codex), so the two PRs differ only by the -xhigh entries.
- Its test uses the observed row shape, with the mismatch and wrong-
  provider negatives.
- The live session-joined acceptance run now exits 0 (join=session, high
  and xhigh). Main's script and this branch's first one exit 1 on the
  same session, and the new test rows fail against both.

P2-2. The -xhigh route needs OmniRoute PR 15167. Main's plan gpt-gateway
row (owners[75]) still installs the published [email protected], which
answers HTTP 400 for cx/gpt-6.1-sol-xhigh (receipt C7). The amendment's
dependency field and the research-harnesses plan notes now record that
this lands after #723.

P3:
- The amendment lists the -max alternative, why it is out of the ruling's
  scope, and the comparison that would restore it.
- It records the owed 24 h zero-downgrade re-measure after the reinstall.
- Citations move to public pins (c1e30b76 for codex.ts and callLogs.ts,
  0585aba55 for reasoningSuffix.ts L54-58) and the install lines (install.sh
  L911 and L930).
- It qualifies NULL in the effort columns (encrypted-reasoning rows only),
  so the 12-row before-count is a lower bound.

The wrapper and config bytes are unchanged (fbf0f46a, 8edd6747), so the
observed run still describes them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
seathatflowsinourveins added a commit that referenced this pull request Oct 6, 2026
…json (hot-file protocol, last commit)

docs/lanes.md hot-file protocol, folded into a single last commit after
the #774 review round. host_receipts.register_file re-registers
integration-resolutions.json, install-plan.json, SOURCES.md,
gateway-effort-accept.py and tests/test_new_wsl_client_config.py.
component_matrix.py --write and new_host_grand_list.py --write left their
reports unchanged. python3 scripts/validate.py passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@seathatflowsinourveins
seathatflowsinourveins force-pushed the claude/ns2604-gptr-effort-20261006 branch from 640a719 to e16ece0 Compare October 6, 2026 06:02
seathatflowsinourveins and others added 6 commits October 6, 2026 06:43
…rces

Run 20261005T222529Z-1387309 exited 0 with sources_count: 0 and a 105-word
report. After a successful CLI exit the wrapper now reads upstream's own
count, the frontmatter sources_count of the one report the CLI writes under
outputs/ (cli.py L209-245, L225, L332-336 at 0957c301), and exits 3 when
there is not exactly one report, no single sources_count in a closed
frontmatter, or zero sources. The CLI's own status (124 from the watchdog)
still passes through, and the run directory is always printed.

The retriever stays duckduckgo. GPT Researcher v3.7.0 (identical to main)
calls ddgs text() with region 'wt-wt' and the default 'auto' backend and
exposes neither to configuration. ddgs 9.16.0 is the newest release, and
the region was declined upstream (deedy5/ddgs#417; PR #474 unmerged). The
zero-source run came from per-engine throttling of this host (probe: brave
429, duckduckgo 202, google and mojeek 403, yahoo alone with results),
which no pin removes. The wt.wikipedia.org DNS error is only the error the
aggregator records. Keyless scholarly retrievers measured off-topic (arxiv),
empty (openalex) or 429 (semantic_scholar) and would mask a dead web search
under the guard. SearXNG through the searx retriever remains the owed
durable route.

Tests: the stand-in CLI writes upstream-shaped frontmatter; new cases cover
zero sources, uncountable reports and status pass-through.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… "\n", fix the exit contract (#759 review)

The command center's review of 93f3cbe (P3):
- A query is written into the report frontmatter by cli.py's _yaml_quote
  (L220-222 at 0957c301), which escapes only backslashes and double quotes.
  A query with "\n" or "\r" could forge the sources_count line the guard
  reads, so the wrapper refuses it as a usage error (exit 2) before
  anything runs.
- The guard now splits at "\n" only, as upstream joins the frontmatter
  (cli.py L245). str.splitlines() also broke at U+2028, which upstream
  leaves inside the query's line, so such a query could forge a count on a
  zero-source run.
- The exit contract in the header: 2 is the wrapper's usage error, and the
  CLI's own status passes through unchanged (argparse's usage error is also
  2; 124 from the watchdog; 125-127 when the timer or env cannot run).
- sources_count counts URLs a run tried to read, not pages it read
  (skills/researcher.py L813-834, L911-913, L922-924, L1088-1098), so a
  count above 0 is necessary, not sufficient. The cause wording is now
  "probable": ddgs returns empty without raising both on a non-200 and on a
  200 without hits.

Tests: the stand-in CLI writes the run's own query through upstream's
_yaml_quote. New cases cover line-break refusal, the U+2028 forgery and a
CLI exit 2 passing through. The discriminating control runs this module
against older wrappers in a mirror: ecfa112 fails 14 checks, 93f3cbe
fails exactly the 4 new ones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d body effort (FAST stays -high)

The command center's ruling (item task-ns2604-coop-20261006T043449Z,
section 4): FAST keeps cx/gpt-6.1-sol-high, per the decisions
2026-10-04-round2-plan-g4-config.md:66 and
2026-10-05-round2-adoption-repair.md:53. The effort each request sends must
agree with its alias.

Finding: the global LLM_KWARGS.reasoning_effort=xhigh reached all three
roles. On the -high FAST alias the gateway's suffix outranks the body
effort (codex.ts L1428-1433 in the running build
omniroute-3.8.51-5f4b3d577-affinity-pr15167). call_logs held 12
GPT Researcher FAST rows in the 24 h before this change asking xhigh and
going upstream as high.

GPT Researcher v3.7.0 (0957c301) has no per-role kwargs:
- config/variables/base.py L35 and L46 declare one LLM_KWARGS and one
  REASONING_EFFORT;
- config.py L97 reads REASONING_EFFORT from the environment only;
- utils/llm.py L86-87 and L103-104 send it only for listed OpenAI models
  and merge LLM_KWARGS into every call.
So the alias suffix is the only per-role lever.

- config: smart and strategic use openai:cx/gpt-6.1-sol-xhigh (the gateway
  parses -xhigh, reasoningSuffix.ts L54-58); FAST stays
  openai:cx/gpt-6.1-sol-high; LLM_KWARGS.reasoning_effort is removed.
- wrapper preflight: the exact new models, and no reasoning_effort or
  reasoning key at any depth of LLM_KWARGS.
- integration ledger: the dated amendment
  repair_round_4.research_configuration_amendment_2026_10_06 binds the new
  config bytes and chains to the 2026-10-05 record (superseded_by). It
  records one patched run: call_logs for
  gptr-20261006T044527Z-3989681 show 3 x -xhigh to xhigh and 1 x -high to
  high, with no body effort.
- dated notes in both decision records, the plan row's notes and SOURCES.md.
- gateway-effort-accept.py: accepts cx/gpt-6.1-sol-xhigh (xhigh); DeerFlow
  keeps the plain route.
- tests: the configuration chain, the new preflight cases and the new
  route. A disarmed effort check fails exactly the two new preflight cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the PR 15167 dependency, -max alternative, owed re-measure

The command center's verdict on 640a719 (ACK_AFTER; item
task-ns2604-coop-20261006T055125Z).

P2-1. The call-log API returns requestedModel under the provider id
codex/, not the requested cx/ alias: OmniRoute@c1e30b76
src/lib/usage/callLogs.ts L221-231 and L479 rewrite only provider-node
prefixes. Live rows for gptr-20261006T044527Z-3989681 read
codex/gpt-6.1-sol-xhigh, provider codex.
- gateway-effort-accept.py: ROUTES now holds the cx/ and codex/ spelling
  of each route (plain and -high as #723 adds them, plus -xhigh). It uses
  #723's stricter predicate (alias suffix equals the logged model; provider
  codex), so the two PRs differ only by the -xhigh entries.
- Its test uses the observed row shape, with the mismatch and wrong-
  provider negatives.
- The live session-joined acceptance run now exits 0 (join=session, high
  and xhigh). Main's script and this branch's first one exit 1 on the
  same session, and the new test rows fail against both.

P2-2. The -xhigh route needs OmniRoute PR 15167. Main's plan gpt-gateway
row (owners[75]) still installs the published [email protected], which
answers HTTP 400 for cx/gpt-6.1-sol-xhigh (receipt C7). The amendment's
dependency field and the research-harnesses plan notes now record that
this lands after #723.

P3:
- The amendment lists the -max alternative, why it is out of the ruling's
  scope, and the comparison that would restore it.
- It records the owed 24 h zero-downgrade re-measure after the reinstall.
- Citations move to public pins (c1e30b76 for codex.ts and callLogs.ts,
  0585aba55 for reasoningSuffix.ts L54-58) and the install lines (install.sh
  L911 and L930).
- It qualifies NULL in the effort columns (encrypted-reasoning rows only),
  so the 12-row before-count is a lower bound.

The wrapper and config bytes are unchanged (fbf0f46a, 8edd6747), so the
observed run still describes them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…json (hot-file protocol, last commit)

docs/lanes.md hot-file protocol, folded into a single last commit after
the #774 review round. host_receipts.register_file re-registers
integration-resolutions.json, install-plan.json, SOURCES.md,
gateway-effort-accept.py and tests/test_new_wsl_client_config.py.
component_matrix.py --write and new_host_grand_list.py --write left their
reports unchanged. python3 scripts/validate.py passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant