Repository navigation
fix(session): 上流アカウント遮断のモデルは再送せず、別系統モデルに切り替えて続ける - #54
Merged
yukihamada merged 1 commit intoOct 31, 2026
Merged
yukihamada merged 1 commit into
yukihamada merged 1 commit into
Conversation
teai が 503「Upstream provider for `X` is blocked at the account level」を返すと (残高切れ・鍵失効。経路は裏プローブ成功まで閉じたまま)、同じモデルへ ストリーム内5回+自動再開5回=最大36回送り続けて止まっていた。 10-29〜31のログでは10以上の会話が1会話あたり最大30回この状態で失敗していた (他のモデルは同時刻に正常応答)。 - retry: 遮断エラーはストリーム内で再送しない - prompt: 遮断を受けたら、利用者の設定(SENTE_FALLBACK_MODELS → small_model → 各agentのmodel → model)から、遮断された系統(ベンダー接頭辞)以外の最初の モデルでそのターンを続け、状態表示に「X の提供元が停止中のため Y に切り替えて 続けます」を出す。候補が無ければ従来どおり自動再開のみ - 検証: script/verify/model-block-fallback-e2e.py(偽サーバー+実バイナリ) 出荷版 2026.10.30-63 は 0/3(遮断モデルへ17回送って未完了)、本修正は 3/3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
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.
何が起きていたか
teai が 503
Upstream provider for X is blocked at the account levelを返すと(残高切れ・鍵失効。経路は裏プローブ成功まで閉じたまま)、Sente は同じモデルへストリーム内5回+自動再開5回(最大36回)送り続けて止まっていた。~/.local/share/sente/log/sente.log*の 10-29〜31 では、10以上の会話が1会話あたり最大30回この状態で失敗(claude-sonnet-5 / kimi-k3 / gpt-6-luna / deepseek)。同時刻に他のモデルは正常応答していた。変更
retry.ts: 遮断エラーはストリーム内で再送しないprompt.ts: 遮断を受けたら、利用者の設定から遮断された系統(ベンダー接頭辞)以外の最初のモデルでそのターンを続ける。順番はSENTE_FALLBACK_MODELS→small_model→ 各 agent の model →model。状態表示に「X の提供元が停止中のため Y に切り替えて続けます」。候補が無ければ従来どおり自動再開のみsession/model-fallback.tsとテスト、script/verify/model-block-fallback-e2e.py検証
bun run typecheckOKbun test test/session: 540 pass / 7 fail。7件は変更前(headless-model-fallback)でも同じ7件が失敗(534 pass / 7 fail)戻し方
git revert <squash SHA>を PR で。revert すると遮断時は従来どおり同モデル再送に戻る(データ・設定への影響なし)。🤖 Generated with Claude Code