Gemini starter module
Gemini library
Centralizes the Gemini client, model settings, media helpers, and response checks.
- Files
- 7
- Lines
- 521
- Languages
- TypeScript
Included files
This page lists paths and purposes, not source contents.
src/lib/app-adapter.ts
The seam between this starter and YOUR application.
TypeScript
125 lines
src/lib/approved-models.ts
The trusted list of Gemini models this app may call.
TypeScript
107 lines
src/lib/classify-gemini-error.ts
Classifies a failed Gemini call so the fallback module can decide what to do.
TypeScript
73 lines
src/lib/env.ts
Validated environment access.
TypeScript
53 lines
src/lib/gemini-client.ts
One Gemini client per API key for the whole app.
TypeScript
31 lines
src/lib/request-account.ts
Resolves which app account is making an AI request.
TypeScript
8 lines
src/lib/types.ts
Shared types for the Gemini starter: the adapter contract, usage records, and tool results.
TypeScript
124 lines