Skip to content

Commit bc31b07

Browse files
committed
fix(deploy): enable chat image attachments in model registry
1 parent 6293d09 commit bc31b07

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ Without Traefik, use `http://localhost:<port>` directly. The `*.klicker.com` dom
211211
- **Participant email uniqueness across auth modes**: Prisma enforces `Participant @@unique([email, isSSOAccount])`, so the same normalized email can exist once as manual and once as SSO. To block new cross-mode duplicates, account creation must explicitly check normalized email collisions in service logic. (`packages/graphql/src/services/accounts.ts`)
212212
- **Helm v3 secrets are external**: `deploy/charts/klicker-uzh-v3/` deployments reference `envFrom.secretRef` names, but the chart currently defines no `Secret` manifests; secrets must be provisioned out-of-band with matching names. (`deploy/charts/klicker-uzh-v3/templates/`)
213213
- **Edited chat image hydration needs a stable source id**: Edited branch messages in `apps/chat` get fresh local message ids, so image hydration must distinguish the local target message id from the persisted source message id (`attachmentSourceMessageId`) when fetching and merging attachments. (`apps/chat/src/hooks/useThreadManagement.ts`, `apps/chat/src/stores/chatStore.ts`)
214+
- **Deployed chat model registries default attachment support off**: `apps/chat` loads `CHAT_MODEL_REGISTRY_JSON` via `chatModelRegistry.ts`, where omitted `supportsImageAttachments` values default to `false`; if deployment values override the built-in registry, each image-capable model must set the flag explicitly in `deploy/env-uzh-*/values.yaml` or the attach button disappears.
214215
- **Embedded PWA messaging trust boundary**: For embedded PWA pages, use a parent-initiated `postMessage` handshake to capture `event.origin` and avoid `'*'` target origins; do not add a second per-platform messaging allowlist in page code. Embedding permission remains enforced separately by ingress `frame-ancestors`. (`apps/frontend-pwa/src/pages/course/[courseId]/practiceQuizzes/[id].tsx`, `deploy/charts/klicker-uzh-v3/templates/ingress-frontend-pwa.yaml`)
215216
- **Local embed harness target**: `util/embed-harness/` is for local verification only and should target the branch-local PWA (`http://127.0.0.1:3101/...`), not `https://pwa.klicker.com/...`, because production CSP / `frame-ancestors` blocks localhost embedding. (`util/embed-harness/`)
216217

deploy/env-uzh-prd/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ chat:
206206
deploymentId: klickeruzh/azure/gpt-4.1
207207
name: GPT-4.1
208208
description: OpenAI model
209+
supportsImageAttachments: true
209210
fallback: false
210211
cost:
211212
input: 2.0
@@ -214,6 +215,7 @@ chat:
214215
deploymentId: klickeruzh/azure/gpt-5.1
215216
name: GPT-5.1
216217
description: OpenAI reasoning model
218+
supportsImageAttachments: true
217219
fallback: false
218220
cost:
219221
input: 1.25
@@ -222,6 +224,7 @@ chat:
222224
deploymentId: klickeruzh/azure/gpt-4.1-mini
223225
name: GPT-4.1 Mini
224226
description: Small OpenAI model
227+
supportsImageAttachments: true
225228
fallback: true
226229
cost:
227230
input: 0.4

deploy/env-uzh-stg/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ chat:
163163
deploymentId: klickeruzh/azure/gpt-4.1
164164
name: GPT-4.1
165165
description: OpenAI model
166+
supportsImageAttachments: true
166167
fallback: false
167168
cost:
168169
input: 2.0
@@ -171,6 +172,7 @@ chat:
171172
deploymentId: klickeruzh/azure/gpt-5.1
172173
name: GPT-5.1
173174
description: OpenAI reasoning model
175+
supportsImageAttachments: true
174176
fallback: false
175177
cost:
176178
input: 1.25
@@ -179,6 +181,7 @@ chat:
179181
deploymentId: klickeruzh/azure/gpt-4.1-mini
180182
name: GPT-4.1 Mini
181183
description: Small OpenAI model
184+
supportsImageAttachments: true
182185
fallback: true
183186
cost:
184187
input: 0.4

0 commit comments

Comments
 (0)