Repository navigation
VFG-101 LLM の順を Gemini 4 → Gemini 3.8 → Claude Haiku 5.5 の 1 回ずつにする - #62
Merged
Merged
Conversation
…回ずつにする Gemini の無料枠を先に使い、混雑のときだけ有料の Claude Haiku に落とす。同じモデルでのやり直し・待ち・周回はやめ、失敗や検証落ちは次のモデルへ進める。
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.
概要
台本の LLM を、Gemini の無料枠を先に使い、使えないときだけ有料の Claude Haiku 5.5 に落とす構成にします。同じモデルでのやり直し・待ち・周回はやめ、各モデルを 1 回ずつ試します。
変更内容
@anthropic-ai/sdk) で Claude を呼ぶクライアントを追加。構造化出力はoutput_config.format、effort はmedium、max_tokensは 16000。SDK の自動のやり直しは 0 回。stop_reasonがmax_tokens・refusalなどのときは失敗。トークン数を記録llm.modelOrderにし、既定をgemini-4-hydrogen→gemini-3.8-flash→claude-haiku-5-5に変更 (gemini-3.6-flash・gemini-3.5-flash-liteは外す)。選定と台本の全段階が同じ順を使うllm.retry) と、段階内の作り直しを削除。検証に落ちたら次のモデルへ進み、その問題を次のプロンプトに添えるANTHROPIC_API_KEYがなければ Claude を飛ばして警告maxCallsPerRunを 24 → 18 (5 呼び出し × 3 モデル = 15 + JSON モードの送り直しの余裕)llmにmodelsとtokensを追加し、retriesを削除.env.exampleを更新動作確認
pnpm lintpnpm typecheckpnpm test(外部の API は呼ばず、fetchをモック)pnpm format:checkリスクの確認
.env*、キー、トークン) を含めていない人が確認すること
.github/workflows/generate.ymlのenvにANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}を足し、Secrets を登録 (別の PR)anyOfを含む) を受け付けるかの確認 (README の手順)補足
budget_tokensを 400 にする指定がありましたが、公式の移行ガイドでは Haiku 5.5 でthinking.budget_tokensはエラーになるため送らず、既定の adaptive とeffortだけにしました。