Skip to content

test(website): the live GitHub site is ready when github.com answers, not its rate-limited API - #915

Merged
earakely-scale merged 4 commits into
mainfrom
edgararakelyan/bracketed-model-names
Nov 24, 2026
Merged

earakely-scale merged 4 commits into
mainfrom
edgararakelyan/bracketed-model-names

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

The live GitHub site that browser_clock_test and website_browser_test deploy (tst/data/live_github_website/server.py) checked it was ready by reading a repository from api.github.com. That API allows an unauthenticated caller 60 calls an hour, and CI's shared runner addresses use them up. Every poll of a failing check called the API again, so a slow-tier shard failed with HTTP Error 403: rate limit exceeded after waiting 300 s.

Change

  • The ready check (site_answers) sends a HEAD to https://github.com/ and is ready on a 200.
  • The API is now called only when a test reads the site's state, which website_browser_test does once.
  • The module's docstring says why.

Testing

  • https://github.com/ answers HEAD with 200, checked from outside CI.
  • On this branch, CI's slow tier ran both tests that deploy the site with the new check, and all passed:
    • browser_clock_test: 4 tests;
    • website_browser_test: 8 tests.

Scope

This pull request first also changed the price lookup to price a model named with a trailing tag such as Claude Code's [1m], and one behind a route of several / segments. Both changes were taken out.

  • The tag rule helped too little. Main already prices a [1m] entry from its per-model rows. When the rows are tagged, main keeps Claude Code's own figure instead. That leaves only a turn with neither rows nor a cost, which main leaves unpriced.
  • The route rule was a guess. It assumed the last segments of a name are the model. That would charge, for example, an OpenRouter call at the provider's direct price.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

The live GitHub fixture checks readiness with a HEAD request to https://github.com/, rather than reading the rate-limited API.

  • The GitHub test site reports ready when github.com answers.

Reviews (8) · Last reviewed commit: "chore(pricing): take the price lookup ch..." · Reviewed by Greptile

…ed as its base model

The live GitHub test site's ready check loads github.com rather than its API, whose 60 unauthenticated calls an hour
CI's shared addresses spend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale requested a review from a team as a code owner November 24, 2026 18:44
…me to find its price

The lookup dropped only the first "/" segment, so a route of several segments stayed unpriced though its model is in
the map: the Gemini agent's documented vertex_ai/global/<model>, LiteLLM's openrouter/<org>/<model> and
bedrock/converse/<model>. The nearest route with an entry wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale earakely-scale changed the title feat(pricing): a model named with a trailing tag such as [1m] is priced as its base model feat(pricing): price a model named behind a multi-segment route or with a trailing tag such as [1m] as its base model Nov 24, 2026
earakely-scale and others added 2 commits November 24, 2026 13:01
… keep one test for the route rule

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main already prices a [1m] entry from its per-model rows, or from Claude Code's own figure when the rows are tagged,
so the tag rule helped only a turn with no rows and no cost, and the route rule guessed which segments name the model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale earakely-scale changed the title feat(pricing): price a model named behind a multi-segment route or with a trailing tag such as [1m] as its base model test(website): the live GitHub site is ready when github.com answers, not its rate-limited API Nov 24, 2026
@earakely-scale
earakely-scale merged commit b574974 into main Nov 24, 2026
35 of 38 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/bracketed-model-names branch November 24, 2026 21:29
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.

1 participant