Skip to content

fix(upstreams): an inference test a ChatGPT account can take - #118

Merged
fylorn merged 2 commits into
devfrom
fix/speed-test-chatgpt
Sep 23, 2026
Merged

fylorn merged 2 commits into
devfrom
fix/speed-test-chatgpt

Conversation

@fylorn

@fylorn fylorn commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Pins core v0.28.0 (Core#108), where the inference test learned every kind of upstream, and follows it in the dialog.

Before this, picking a ChatGPT account and pressing the button printed an inference test does not support a Chatgpt upstream yet, so nothing was sent — in English, in the Chinese UI, because that sentence had no code.

In the dialog

  • An upstream that takes no output limit shows "no limit" and "by actual usage". The Codex backend refuses max_output_tokens, so there is no ceiling to price against; a number in those cells would have been made up. The total goes unknown with it and says why.
  • A failed run speaks the app's language. The result's error is a Msg now, so l3.refused, l3.stream_failed and l3.not_streamed have Chinese in the table.

Checked

  • Typecheck, vitest, cargo clippy --all-targets -D warnings, cargo test, cargo fmt --check.
  • The dialog in an isolated preview, Chinese and English: the estimate table (no limit / by actual usage / an amount / free), the three error codes in the result table, and the total row on one line in both languages.
  • Against the real twcore v0.28.0 over the control socket: a streaming upstream reports the first token and the usage, an upstream that answers with a whole body fails with l3.not_streamed, a reasoning model's estimate carries the bigger limit, and a ChatGPT account's estimate carries neither a limit nor an amount.

🤖 Generated with Claude Code

fylorn and others added 2 commits September 23, 2026 09:59
The inference test used to refuse a ChatGPT account outright, and the
refusal arrived as an English sentence the Chinese UI printed as is.
Core now runs the test for every kind of upstream and says why it failed
with a code, so the dialog reads:

- An upstream that takes no output limit shows "no limit" and "by actual
  usage" rather than a limit and an amount that were made up. The total
  goes unknown with it, and says that is what happened.
- A failed run says what went wrong in the app's own language.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@fylorn
fylorn merged commit 864e060 into dev Sep 23, 2026
2 checks passed
@fylorn
fylorn deleted the fix/speed-test-chatgpt branch September 23, 2026 02:20
@fylorn fylorn mentioned this pull request Sep 23, 2026
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