Map Thinking Budget to Reasoning Effort for OpenAI Models
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 65/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start by locating the OpenAI adapter and the sibling issue's isReasoning branch, then read how it builds bodyPayload and accesses the model sampling profile. Add the specified thinkingBudget mapping and cover numeric thresholds, string values, absent budgets, and standard models in tests. Done when those tests and the listed typecheck, test, and lint commands pass.
索引モデルが issue の本文から書いたものです。
説明
Goal
Add reasoning_effort parameter support to the OpenAI adapter for reasoning models that accept it (o3, o3-mini, o4-mini, gpt-6).
Background
OpenAI's reasoning models accept a reasoning_effort parameter with values "low", "medium", or "high" that controls how many internal thinking tokens the model uses. Currently Codra sends no such parameter and cannot tune the cost/quality tradeoff for reasoning model calls.
This sub-issue is part of the parent issue: OpenAI adapter incompatible with reasoning models.
What to Build
After the isReasoning branch is in place (see sibling sub-issue), read the thinkingBudget from the model's sampling profile and map it to reasoning_effort:
if (isReasoning && sampling?.thinkingBudget) {
let effort: "low" | "medium" | "high" | undefined;
if (typeof sampling.thinkingBudget === "number") {
effort =
sampling.thinkingBudget > 10000 ? "high"
: sampling.thinkingBudget > 3000 ? "medium"
: "low";
} else if (
sampling.thinkingBudget === "low" ||
sampling.thinkingBudget === "medium" ||
sampling.thinkingBudget === "high"
) {
effort = sampling.thinkingBudget;
}
if (effort) {
bodyPayload.reasoning_effort = effort;
}
}
Done When
-
reasoning_effortis included in requests to supported reasoning models when a thinking budget is configured - Numeric budgets are mapped to low/medium/high correctly
- String values low/medium/high are passed through directly
- The parameter is omitted when no thinking budget is configured
- Standard (non-reasoning) models are not affected
- Tests cover all mapping cases and the absent-budget case
-
npm run typecheck,npm test, andnpm run lintall pass
- 主要言語
- TypeScript
- スター
- 125
- フォーク
- 23
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
devarshishimpi/codra のほかの issue
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
devarshishimpi/codra#178 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
devarshishimpi/codra#176 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
devarshishimpi/codra#186 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
devarshishimpi/codra#185 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
devarshishimpi/codra#184 ·
メンテナーはふだん 1 日以内に返信
devarshishimpi/codra の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 83/100
gofish-graphics/gofish-graphics#1384 ·
メンテナーはふだん 1 日以内に返信
-
adapter bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
Olanetsoft/agent-lookout#353 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
vicharanashala/vibe#1542 ·
メンテナーはふだん 1 日以内に返信
-
bug chore P2 size:XS
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
josephfung/curia#2666 ·
メンテナーはふだん 1 日以内に返信
-
area: batch
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
inabagumi/shinju-date#7294 ·
メンテナーはふだん 1 日以内に返信