Skip to content

Commit dd013ae

Browse files
zcoderrclaude
andcommitted
feat: add GEMINI_API_KEY as secure environment variable
Declare GEMINI_API_KEY in blocklet.yml with secure: true so the value is masked in the Blocklet dashboard. Reorder the key lookup to prefer the secure env var over the plaintext preferences field. Co-authored-by: Claude <noreply@anthropic.com>
1 parent c43fea5 commit dd013ae

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

api/src/ai/voice-model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ const DEFAULT_VOICE = 'Aoede';
1010

1111
export function getGeminiApiKey(): string {
1212
const key =
13-
(Config.env.preferences?.gemini_api_key as string) ||
1413
process.env.GEMINI_API_KEY ||
1514
process.env.GOOGLE_API_KEY ||
15+
(Config.env.preferences?.gemini_api_key as string) ||
1616
'';
1717
return key;
1818
}

blocklet.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repository:
1313
type: git
1414
url: git+https://github.com/blocklet/create-blocklet.git
1515
specVersion: 1.2.8
16-
version: 0.1.9
16+
version: 0.1.10
1717
logo: logo.png
1818
files:
1919
- dist
@@ -86,6 +86,12 @@ environments:
8686
required: false
8787
default: ''
8888
secure: false
89+
- name: GEMINI_API_KEY
90+
description: Google Gemini API key for voice chat
91+
required: false
92+
secure: true
93+
default: ''
94+
shared: false
8995
- name: APPLE_CLIENT_ID
9096
description: Apple Sign-In client ID
9197
required: false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "aistro-ai",
33
"private": true,
4-
"version": "0.1.9",
4+
"version": "0.1.10",
55
"scripts": {
66
"dev": "blocklet dev",
77
"lint": "tsc --noEmit && eslint src api/src --ext .mjs,.js,.jsx,.ts,.tsx",

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.9
1+
0.1.10

0 commit comments

Comments
 (0)