Skip to content

gateway: the reprobe round reaches the custom providers too - #86

Merged
LAGcomcom merged 1 commit into
LAGcomcom:masterfrom
ghshhf:pr/reprobe-custom-providers
Oct 17, 2026
Merged

LAGcomcom merged 1 commit into
LAGcomcom:masterfrom
ghshhf:pr/reprobe-custom-providers

Conversation

@ghshhf

@ghshhf ghshhf commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

The 模型 page's 重新探测可用性 button (POST /admin/api/reprobe) drove Lane.ProbeRound alone, so a user-added provider's model kept showing the placeholder custom state. adminState only replaces that placeholder when customProbeOf holds a verdict, and the per-card 测试 button was the only writer — so reaching a real verdict on a provider's roster meant clicking every card by hand, one at a time.

What it does

  • probeCustomProviders runs the round over every enabled provider's models, and each one goes through probeCustomOne — the same path the per-card 测试 button takes. A model probed by hand and one probed in bulk cannot disagree about what the upstream answered.
  • Models the user unchecked are skipped: they are not served to agent pickers, so their verdict is not worth an upstream call.
  • Concurrency is capped at 4, deliberately below the lane's 8: these upstreams bill per request, and one round can span several providers at once.
  • probeTasks.begin de-duplicates, so a second press while a round is still running — or a per-card click landing mid-round — keeps the in-flight run instead of buying a second upstream call for the same question. Each card reports progress through its own task; the bulk round stays out of currentProbingModel on purpose, since that field can only name one model and a round has none to name.

Verified: go vet ./... + go test ./... green. Two regression tests: the round files a real verdict for provider/model and the card leaves the custom placeholder; and a second press does not hit the upstream twice (the provider gets its own test upstream so the free-lane round running in parallel is not counted as a custom call).

The button used to drive the free lane alone, so every user-added
provider's model sat on the placeholder "custom" state until each card
was clicked by hand. The round now covers every enabled provider's
models through the same probeCustomOne path the per-card 测试 uses,
skips unchecked models, caps concurrency at 4 (these upstreams bill per
request), and leans on the task registry to de-duplicate a second press
while one is still running.
@LAGcomcom
LAGcomcom merged commit 4779b11 into LAGcomcom:master Oct 17, 2026
3 checks passed
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