chore(ci): drive gate model from a repo variable, cheap 8B default - #141
Merged
Conversation
Both browser gates hardcoded --model gpt-5.2. Read the model from the BAD_CI_MODEL repo variable instead, defaulting to groq/llama-3.1-8b-instant served through router.tangle.tools — the same model and router the bad-app real-ui gate and agent-builder's bad-prod-release already run daily against this driver. groq/* model ids only resolve through an OpenAI-compatible router, so the gate step also sets LLM_BASE_URL (the driver's proxy knob) from BAD_CI_LLM_BASE_URL, defaulting to the router. Flipping either variable in repo settings changes the next run — no commit, no revert PR.
tangletools
approved these changes
Aug 3, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — dfaabe9b
This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: drewstone_author · 2026-08-03T18:04:31Z
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.
Problem
Both surviving browser gates hardcode
--model gpt-5.2. Changing the model — to cut cost or to revert a flaky experiment — takes a commit and a merge.Two scope notes against the original request, found while verifying:
nightly-reliability.ymlandtier3-public-gate.yml. This PR covers the two survivors:tier1-gate.ymlandtier2-staging-gate.yml.OPENAI_API_KEYsecret (repo secrets:NPM_TOKENonly; org secrets visible to this repo contain no OpenAI key either). Live runs prove it: tier1 "success" runs skip the gate step ("Run deterministic gate: skipped", e.g. run 30668895116). The dollar figures below are what the gates cost once someone re-adds a key — this PR makes that armed state cheap by default instead of $50/mo by default.Change
Model comes from a repo Actions variable (not secret), defaulting cheap:
--model "${{ vars.BAD_CI_MODEL || 'groq/llama-3.1-8b-instant' }}"groq/*model ids only resolve through an OpenAI-compatible router (the driver has no groq provider; itsopenaiprovider hitsapi.openai.comunlessLLM_BASE_URLis set — the model swap alone would 404). So the gate step also wires the driver's proxy knob:Cost per workflow (when armed with a key)
8B estimate: groq llama-3.1-8b-instant is $0.05/M input, $0.08/M output — ~3 orders of magnitude under gpt-5.2. Precedent for the absolute number: bad-app's daily
real-ui-gate.ymldrives this same driver on the same model for ~$0.05/mo.Precedent — same driver, same model, running today
real-ui-gate.yml: daily,BAD_CI_LLM_MODEL: groq/llama-3.1-8b-instantthroughhttps://router.tangle.tools/v1with the router key asOPENAI_API_KEY.bad-prod-release.yml: daily production UI gate, exactly this pattern —BAD_MODEL: ${{ vars.BAD_MODEL || 'groq/llama-3.1-8b-instant' }},BAD_BASE_URL: https://router.tangle.tools/v1,OPENAI_API_KEY: ${{ secrets.TANGLE_CI_ROUTER_KEY }}.Revert / override — no commit, ever
Repo Settings → Secrets and variables → Actions → Variables:
BAD_CI_MODEL=gpt-5.2. Router serves OpenAI models too, so the base URL can stay put (with a router key inOPENAI_API_KEY).BAD_CI_LLM_BASE_URL=https://api.openai.com/v1and store a raw OpenAI key inOPENAI_API_KEY.Model is a pure pass-through — verified
Checked every hop before touching the default: workflow
--model→run-tier1-gate.mjs/run-tier2-repeat-gate.mjs→run-scenario-track.mjs→run-mode-baseline.mjs→ CLI, wheremergeConfig(fileConfig, cliOverrides)is last-wins, so the flag beats the scenario config'smodel: 'gpt-5.2'. Gate thresholds (pass rate, avg turns, avg duration) andreliability-scorecard.mjsare model-agnostic — no per-model calibrated baselines anywhere in the tier runners that would structurally false-red on a model switch.Validation
python3 -c "yaml.safe_load(...)"— both files parse.actionlint— clean on both files.git merge-tree origin/main HEAD— merges clean.