Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Anthropic API-key requests fail with "credit balance is too low"

クローズ
#666 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@stamdrovas がすでに取り組んでいます。

2026年10月25日 から。

  • #667 @stamdrovas による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
clojure
領域
ai, backend

調査の方向性

Start with the system block in src/eca/llm_providers/anthropic.clj around line 546 and trace how authentication type is passed into chat!. Check linked pull request #667 for work already underway. Done means API-key requests omit the identity block while OAuth requests retain it, with the issue's reproduced API behavior addressed.

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

With an Anthropic API key (provider key, ANTHROPIC_API_KEY, or the Console login), every chat
fails with Anthropic invalid_request_error: Your credit balance is too low to access the Anthropic API,
though the key has credits. The cause is the system block chat! prepends for every auth type,
"You are Claude Code, Anthropic's official CLI for Claude."
(anthropic.clj#L546).
The same key succeeds when that block is absent.

To Reproduce

curl -s https://api.anthropic.com/v1/messages -H "x-api-key: $KEY" \
  -H 'anthropic-version: 2023-06-01' -H 'content-type: application/json' \
  -d '{"model":"claude-sonnet-5-5","max_tokens":5,"messages":[{"role":"user","content":"hi"}]}'
# 200

curl -s https://api.anthropic.com/v1/messages -H "x-api-key: $KEY" \
  -H 'anthropic-version: 2023-06-01' -H 'content-type: application/json' \
  -d '{"model":"claude-sonnet-5-5","max_tokens":5,"messages":[{"role":"user","content":"hi"}],
       "system":[{"type":"text","text":"You are Claude Code, Anthropic'\''s official CLI for Claude."}]}'
# 400 "Your credit balance is too low to access the Anthropic API..."

In ECA: configure an anthropic provider with an API key and send any prompt.

Expected behavior

API-key requests omit the identity block; only OAuth (subscription) requests send it.

Doctor

ECA 0.166.0 (also current master 26176a3), macOS. Seen with claude-sonnet-5-5 and claude-haiku-5-5.

主要言語
Clojure
スター
1k
フォーク
82
平均マージ
2日 2時間
マージ済み PR(30日)
21

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

editor-code-assistant/eca のほかの issue

editor-code-assistant/eca の issue をすべて見る

似ている issue

Clojure の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。