Skip to content

Not all LLM models for gemini API's are available #10515

Description

@gawkward

Describe feature

I've added a google gemini (free their) api key. The only selectable model in the chat window is gemini-2.5-flash, however this model is not available in the free tier anymore. There are several other models that should be accessible with the free tier API key but they are not shown as options (e.g. 3.5 flash, 3.1 flash-lite, etc). Would it be as simple as updating the google.ts file with additional models? Also, apologies if this shouldn't be categorized as an issue.

Log snippet:

'2026/07/15 13:29:18 stdout Created new note 'Nxp6Dwuy8Gha', branch 'KQJ7A7nJy2DV_Nxp6Dwuy8Gha' of type 'llmChat', mime 'application/json'
2026/07/15 13:29:18 stdout Slow query took 236ms: INSERT OR REPLACE INTO entity_changes ( entityName, entityId, hash, isErased, utcDateChanged, isSynced, changeId, componentId, instanceId ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
2026/07/15 13:29:09 stdout 304 GET /api/note-map/twZdmnD6qcnV/backlink-count with 11 bytes took 1ms
2026/07/15 13:29:09 stdout 204 PUT /api/options with 0 bytes took 3ms
2026/07/15 13:28:57 stdout 204 PUT /api/options with 0 bytes took 1ms
2026/07/15 13:28:41 stdout 304 GET /api/notes/_optionsLlm/metadata with 181 bytes took 1ms
2026/07/15 13:28:41 stdout 304 GET /api/note-map/_optionsLlm/backlink-count with 11 bytes took 1ms
2026/07/15 13:28:40 stdout 204 PUT /api/options with 0 bytes took 2ms
2026/07/15 13:28:38 stdout 304 GET /api/notes/_options/attachments with 2 bytes took 1ms
2026/07/15 13:28:38 stdout 304 GET /api/note-map/_options/backlink-count with 11 bytes took 0ms
2026/07/15 13:28:38 stdout 304 GET /api/notes/_options/attachments with 2 bytes took 1ms
2026/07/15 13:28:38 stdout 204 PUT /api/options with 0 bytes took 1ms
2026/07/15 13:28:38 stdout 304 GET /api/notes/_options/metadata with 181 bytes took 1ms
2026/07/15 13:28:38 stdout 204 PUT /api/branches/_hidden__options/expanded/1 with 0 bytes took 0ms
2026/07/15 13:28:21 stdout JS Info: CKEditor state changed to ready
2026/07/15 13:28:20 stdout 204 PUT /api/options with 0 bytes took 2ms
2026/07/15 13:28:20 stdout 304 GET /api/search/%23textSnippet with 2 bytes took 1ms
2026/07/15 13:28:20 stdout 200 GET /api/notes/twZdmnD6qcnV/blob with 2354 bytes took 1ms
2026/07/15 13:28:20 stdout 304 GET /api/note-map/twZdmnD6qcnV/backlink-count with 11 bytes took 1ms
2026/07/15 13:24:28 stdout 204 PUT /api/notes/AS9pvVnm2795/data with 0 bytes took 4ms
2026/07/15 13:24:27 stderr }
2026/07/15 13:24:27 stderr Symbol(vercel.ai.error.AI_APICallError): true
2026/07/15 13:24:27 stderr Symbol(vercel.ai.error): true,
2026/07/15 13:24:27 stderr },
2026/07/15 13:24:27 stderr }
2026/07/15 13:24:27 stderr status: 'NOT_FOUND'
2026/07/15 13:24:27 stderr message: 'This model models/gemini-2.5-flash is no longer available to new users. Please update your code to use a newer model for the latest features and improvements.',
2026/07/15 13:24:27 stderr code: 404,
2026/07/15 13:24:27 stderr error: {
2026/07/15 13:24:27 stderr data: {
2026/07/15 13:24:27 stderr isRetryable: false,
2026/07/15 13:24:27 stderr '}\n',
2026/07/15 13:24:27 stderr '  }\n' +
2026/07/15 13:24:27 stderr '    "status": "NOT_FOUND"\n' +
2026/07/15 13:24:27 stderr '    "message": "This model models/gemini-2.5-flash is no longer available to new users. Please update your code to use a newer model for the latest features and improvements.",\n' +
2026/07/15 13:24:27 stderr '    "code": 404,\n' +
2026/07/15 13:24:27 stderr '  "error": {\n' +
2026/07/15 13:24:27 stderr responseBody: '{\n' +
2026/07/15 13:24:27 stderr },
2026/07/15 13:24:27 stderr 'x-xss-protection': '0'
2026/07/15 13:24:27 stderr 'x-frame-options': 'SAMEORIGIN',
2026/07/15 13:24:27 stderr 'x-content-type-options': 'nosniff',
2026/07/15 13:24:27 stderr vary: 'Origin, X-Origin, Referer',
2026/07/15 13:24:27 stderr 'server-timing': 'gfet4t7; dur=88',
2026/07/15 13:24:27 stderr server: 'scaffolding on HTTPServer2',
2026/07/15 13:24:27 stderr date: 'Wed, 15 Jul 2026 20:24:27 GMT',
2026/07/15 13:24:27 stderr 'content-type': 'text/event-stream',
2026/07/15 13:24:27 stderr 'content-length': '241',
2026/07/15 13:24:27 stderr 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',
2026/07/15 13:24:27 stderr responseHeaders: {
2026/07/15 13:24:27 stderr statusCode: 404,
2026/07/15 13:24:27 stderr },
2026/07/15 13:24:27 stderr serviceTier: undefined
2026/07/15 13:24:27 stderr labels: undefined,
2026/07/15 13:24:27 stderr cachedContent: undefined,
2026/07/15 13:24:27 stderr toolConfig: undefined,
2026/07/15 13:24:27 stderr tools: [ [Object] ],
2026/07/15 13:24:27 stderr safetySettings: undefined,
2026/07/15 13:24:27 stderr systemInstruction: { parts: [Array] },
2026/07/15 13:24:27 stderr ],
2026/07/15 13:24:27 stderr [Object]
2026/07/15 13:24:27 stderr [Object], [Object],
2026/07/15 13:24:27 stderr [Object], [Object],
2026/07/15 13:24:27 stderr [Object], [Object],
2026/07/15 13:24:27 stderr [Object], [Object],
2026/07/15 13:24:27 stderr [Object], [Object],
2026/07/15 13:24:27 stderr [Object], [Object],
2026/07/15 13:24:27 stderr contents: [
2026/07/15 13:24:27 stderr },
2026/07/15 13:24:27 stderr thinkingConfig: undefined
2026/07/15 13:24:27 stderr responseModalities: undefined,
2026/07/15 13:24:27 stderr responseSchema: undefined,
2026/07/15 13:24:27 stderr responseMimeType: undefined,
2026/07/15 13:24:27 stderr seed: undefined,
2026/07/15 13:24:27 stderr stopSequences: undefined,
2026/07/15 13:24:27 stderr presencePenalty: undefined,
2026/07/15 13:24:27 stderr frequencyPenalty: undefined,
2026/07/15 13:24:27 stderr topP: undefined,
2026/07/15 13:24:27 stderr topK: undefined,
2026/07/15 13:24:27 stderr temperature: undefined,
2026/07/15 13:24:27 stderr maxOutputTokens: 8096,
2026/07/15 13:24:27 stderr generationConfig: {
2026/07/15 13:24:27 stderr requestBodyValues: {
2026/07/15 13:24:27 stderr url: 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse',
2026/07/15 13:24:27 stderr cause: undefined,
2026/07/15 13:24:27 stderr at async /usr/src/app/main.cjs:1621:964 {
2026/07/15 13:24:27 stderr at async fn (/usr/src/app/main.cjs:1626:19765)
2026/07/15 13:24:27 stderr at async Fe (/usr/src/app/main.cjs:1626:13553)
2026/07/15 13:24:27 stderr at async H5n (/usr/src/app/main.cjs:1621:4980)
2026/07/15 13:24:27 stderr at async /usr/src/app/main.cjs:1621:964
2026/07/15 13:24:27 stderr at async fn (/usr/src/app/main.cjs:1626:14394)'
2026/07/15 13:24:27 stderr at async h9n.doStream (/usr/src/app/main.cjs:1994:20740)
2026/07/15 13:24:27 stderr at async yNn (/usr/src/app/main.cjs:1595:19734)
2026/07/15 13:24:27 stderr at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
2026/07/15 13:24:27 stderr at /usr/src/app/main.cjs:1595:20686
2026/07/15 13:24:27 stderr Do [AI_APICallError]: This model models/gemini-2.5-flash is no longer available to new users. Please update your code to use a newer model for the latest features and improvements.'

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions