ProjectTech4DevAI / ProjectTech4DevAI/kaapi-backend

Credentials: Validating Provider Keys

オープン
#374 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

good first issue
主要言語
Python
スター
18
フォーク
10
平均マージ
2日 20時間
マージ済み PR(30日)
14

説明

Describe the current behavior
Currently, when a user provides an OpenAI API key through the credentials endpoint, the key is saved directly to the credentials table without any validation. This means invalid, expired, or incorrectly formatted keys can be stored in the database. Users only discover the key is invalid later when they attempt to use it for LLM operations, leading to failed requests and a poor user experience.

Describe the enhancement you'd like
Add a validity check for OpenAI API keys before saving them to the credentials table. The validation should:

  • Accept the API key from the user via the credentials endpoint
  • Make a test request to OpenAI's API using the provided key (e.g., a lightweight call to list models or verify credentials)
  • Only save the key to the database if the validation succeeds
  • Return a clear error message to the user if the key is invalid, explaining why it failed

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

認証情報エンドポイントから開始し、プロバイダーキーが認証情報テーブルにどのように書き込まれるかを追跡します。検証に使用される OpenAI API リクエストとエンドポイントのエラーハンドリングを確認し、有効なキーが保存されること、無効なキーが明確な説明とともに拒否されること、検証に失敗した場合にキーが永続化されないことを確認します。

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

評価

技術スタック
python
領域
api, backend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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