feat: cost warning
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
調査の方向性
まず、クエリが CLI パラメータとして指定された場合の --file オプションに関する既存のコスト計算と警告のフローを追跡します。コンテキストコストのしきい値を超えたときに、API 呼び出しの前に確認を求め、コストを利用できない場合はトークン数を使用するようになれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
Currently there is a scenario when AI CLI can make expensive API call without user confirmation. This happens when user use --file option and asks a query in CLI params. In such case, even when the price threshold is exceeded and user gets a warning, he is not able to prevent this API call.
Describe the solution you'd like
In case file context is used, and user exceeds warning threshold for context and, and there is a query in CLI params: then CLI should ask user to confirm if it should make the API call before making it.
# ai -i --file file.md Some question
Using the provided file will increase conversation costs by $1.1193 per message.
Do you want to continue? [y/N]:
Describe alternatives you've considered
Warning as is, but there is a risk of making expensive API can which user would not want if he knew the costs.
Additional context
We should use current cost calculation features.
In rare case cost is not available, we should refer to token count.
- 主要言語
- TypeScript
- スター
- 46
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/ai-cli のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
Project Roadmap再び着手できるかも @Q1w1N が 963 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
callstack/ai-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
opengovsg/FormSG#10118 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa bug claude
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
linagora/twake-calendar-frontend#1434 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
iptv-org/iptv#52824 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 78/100
jaegertracing/jaeger-ui#4512 ·
メンテナーはふだん 1 日以内に返信
-
area:ide documentation enhancement platform:macos platform:vscode
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
anthropics/claude-code#97389 ·
メンテナーはふだん 1 日以内に返信