Skip to content

ci(reconcile): settle rounding, route and small-gap questions (AI-2552) - #343

Merged
adamwownysz-redpanda merged 3 commits into
mainfrom
adam/ai-2552-repeat-question-rules
Nov 19, 2026
Merged

adamwownysz-redpanda merged 3 commits into
mainfrom
adam/ai-2552-repeat-question-rules

Conversation

@adamwownysz-redpanda

@adamwownysz-redpanda adamwownysz-redpanda commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Context: the catalog bot (#255), an AI agent, opens a weekly PR matching the SDK's model catalog to vendor docs.

Problem: its 16 Nov PR (#336) asked again about three cases no rule in RULES.md settled.

This PR:

  1. stops asking about a price the vendor's page only rounds;
  2. keeps a Bedrock route (the ID called from an AWS region) when AWS's model page drops that region;
  3. lets the bot add a missing Gemini reasoning level, such as "high", to the SDK's table;
  4. adds tests that fail when a catalog reasoning level can't go into a request.

Who notices: bot PR reviewers get three fewer repeat questions. Bot PRs may add such levels to SDK code, listed for review under "Code changed". No SDK behaviour changes.

Proof: unit tests.

Size: 14 files, about 400 lines: 39% code, 56% tests, 5% rules.

Related PRs:

What changes

Host pages (.claude/skills/reconcile-models/hosts/) tell the bot where each host, such as Vertex, publishes its facts. A skip is the bot leaving something out because a rule says so.

When Before Now File
A vendor's page shows a rate with fewer decimals: Vertex shows Sonnet 4.6's regional cache-write rate of $4.125 as $4.13 The bot asks whether to change it. The bot leaves the rate as it is and writes no row for it. If it asks anyway, the bot PR lists the question under "Not asked: page rounding" with its notes; a question whose notes give another source's rate beyond rounding stays open. A change that only rounds is marked "page rounding?". It counts as rounding only if the catalog's rate, rounded to the page's decimals, gives the page's figure and the two differ by under 1% of the page's rate. RULES.md, cmd/catalog-report/report.go
AWS's model page stops listing a region one of our Bedrock routes starts from The bot asks whether to drop the route. The route stays, and the bot PR lists the region under Skipped as route_unlisted, unless the page announces an end of life. Keeping a dead route costs one failed call; dropping a live one refuses calls that work. RULES.md, hosts/bedrock.md
A host documents a value the SDK refuses only because its table lacks it, such as a new Gemini reasoning level The bot asks every week until a person adds it. The bot adds the entry from the host's reference, with a test of the value sent unless one already checks it (the new level tests do for Gemini). It does so only where the host's page says its API rejects unknown values, so a wrong entry fails loudly: today the Gemini API and Vertex. When a model shares its list of levels with models whose pages lack the new level, it gets a list of its own. RULES.md, hosts/google.md, hosts/vertex.md
The catalog lists a reasoning level, such as high Nothing checked that the SDK can send it. Five tests fail unless each level reaches the request (Gemini API and Vertex, where the SDK silently leaves out a level missing from its table) or is accepted when the model is set up (OpenAI, Meta, Bedrock). provider tests

Also fixed: the new route skip, route_unlisted, leaves out one region, not the whole model, as fixed_fact_differs leaves out one differing fact, such as a release date. Both hid the model's other changes from "Changed with no row", the bot PR's list of unexplained catalog changes. Now those show, and such a skip may sit beside a question (effects.go, RULES.md).

Testing

  • CI passes on all five checks.
  • TestRoundingOnly pins 18 cases: $4.13 for $4.125 isn't asked, while $4 for $3.75 and $0.01 for $0.0075 are. Labelled values such as cache write 4.125 are compared rate by rate, and a boundary case pins the 1% to the page's rate. A question whose notes add another source's $5.00 stays open, and TestOtherRate checks that a label such as 5m cache write isn't read as a rate.
  • Two of the five level tests were tried with a bad level. Both failed: xhigh on Gemini 4 Carbon never reached the request, and ultra on gpt-5 was refused. Vertex shares Gemini's table and Meta shares OpenAI's check, so only Bedrock's check went untried.
  • Not run: a bot run with these rules; the first is Monday 23 Nov.

Risk

  • Bot-written code: a run may edit only the Go files directly in its vendor's provider packages (pr-job.sh enforces this). Anything that isn't plain data is listed under "Code changed" but not blocked, so a reviewer checks it kept to table entries.
  • A real price change of under 1% that the page's rounding hides is not asked about.
  • A route_unlisted row that names no region fails that vendor's PR job, as a no_catalog_field row that names no fact already does.

How to revert

Revert this commit. Table entries a later bot PR adds stay until reverted too.

@redpanda-ai-merge-bot

redpanda-ai-merge-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

⏸️ AI review: human review required

Field Value
Config version 13
Prompt version n/a
Model n/a
Engine agent-action
AI verdict not consulted (gates refused before the model ran)
Files / lines (all) 14 / 437
CI at this commit pending
Reviewable diff 60997 chars (limit 120000)
Reviewable files / lines 14 / 437
Generated (CI-verified) files / lines 0 / 0
Test / source lines 248 / 189 (tests changed with source: True)
Dependency update False
Run https://github.com/redpanda-data/ai-sdk-go/actions/runs/44542762227

Not eligible — reasons

  • touches excluded path(s): .github/reconcile-models/RULES.md, .github/reconcile-models/report.schema.json
  • CI is still running for this commit

Generated by the AI review gate. The bot only posts an approval; the author merges. This is an audit record; the branch ruleset is what enforces it.

The weekly bot asked again about cases a rule can settle. A price a page
only rounds is no longer asked; if the bot asks anyway, code lists the
question with its notes, comparing labelled values rate by rate. A
Bedrock source region dropped from a model card keeps its route, under
its own skip reason, route_unlisted. The bot may add a value the SDK
refuses only because a table lacks it, when the host fails loudly on a
wrong one, giving a model its own list rather than widening a shared
one. Guard tests make every catalogued reasoning level reach the
request, and one-fact skips no longer hide an offering from "Changed
with no row".
@adamwownysz-redpanda
adamwownysz-redpanda force-pushed the adam/ai-2552-repeat-question-rules branch from 2db2133 to 71eed95 Compare November 19, 2026 01:29
Comment thread cmd/catalog-report/report.go Outdated
var needs, rounded []NeedsHuman

for _, item := range report.NeedsHuman {
if item.Field == priceField && slices.Contains(roundingPreempts, item.Rule) && roundingOnly(item.Catalogue, item.Page) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Keep the price question open when another source disagrees.

A sources-disagree row can put a competing rate in Values, which this check skips. I'd keep the question open whenever a competing rate differs by more than rounding so the reviewer can resolve it.

Catalog has 4.125, one source prints 4.13, and another lists 5.00 in Values -> the report moves the question out of Open questions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch, thanks. Fixed in 0092d36 - a row whose notes give a rate that is neither ours nor its rounding now stays under Open questions. Your example (4.125, 4.13, 5.00) is now a case in TestRenderRoundingOnly, and TestOtherRate checks that a label such as 5m cache write isn't read as a rate.

…(AI-2552)

A sources-disagree row can carry a third source's rate in its values.
The rounding check compared only our rate with the page's, so a row
with 4.125 in the catalogue, 4.13 on one page and 5.00 from another
source left Open questions. A note that gives a rate other than ours
or its rounding now keeps the row asked.
…o adam/ai-2552-repeat-question-rules

# Conflicts:
#	.github/reconcile-models/RULES.md
#	cmd/catalog-report/report.go
@adamwownysz-redpanda
adamwownysz-redpanda merged commit 1ad6664 into main Nov 19, 2026
16 checks passed
@adamwownysz-redpanda
adamwownysz-redpanda deleted the adam/ai-2552-repeat-question-rules branch November 19, 2026 14:33
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