0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Gemini 3.8 Flash を試す前に API のモデル ID を確認する

0
Posted at

RouterBase チームからの技術メモです。Gemini 3.8 Flash が RouterBase で利用できるようになりました。本記事とコードは AI の支援を受けて作成しています。

ページの URL とモデル ID を分ける

URL の文字列をそのまま API の model フィールドへコピーするのではなく、接続先の公開カタログで正確な値を確認します。今回の ID は google/gemini-3.8-flash です。

以下は fetch を使える JavaScript 環境で実行する読み取り専用の例です。プロンプトや API キーは送信しません。

const response = await fetch("https://routerbase.com/v1/models");
if (!response.ok) throw new Error(`Catalog HTTP ${response.status}`);
const { data } = await response.json();
if (!Array.isArray(data)) throw new Error("Unexpected catalog response");
const model = data.find(item => item.id === "google/gemini-3.8-flash");
if (!model) throw new Error("Gemini 3.8 Flash is absent from the catalog");
console.log(model.id);

2026 年 9 月 14 日に実行し、対象 ID が返ることを確認しました。HTTP エラー、応答形式の違い、モデルの不在を区別して停止できます。

次に接続設定を確認する

base URL は https://routerbase.com/v1、model は上記の ID です。RouterBase API キーはサーバー側の環境変数で管理します。

カタログにあることは、個別の推論リクエストの成功や回答品質を保証しません。まず短い入力を用意し、期待する回答の条件を先に決めます。

例えば文章から日付を抽出するなら、日付がないケースも含めます。「記載なし」を許容し、空欄を推測で埋めないことを確認します。これは評価方法の例であり、モデルの実測結果ではありません。

モデル情報API ドキュメント

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?