replace gemma image reading with moondream - #222
Conversation
|
Live Workers AI testing found and fixed a response-shape mismatch in
Validation: gateway TypeScript passes; 92 focused tests pass; full gateway suite passes (1325 passed, 5 skipped). A fresh CI run is in progress. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a165e6b70d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| schema: Record<string, unknown>, | ||
| path: string, | ||
| ): void { | ||
| if (Array.isArray(schema.enum) && !schema.enum.some((item) => Object.is(item, value))) { |
There was a problem hiding this comment.
Enforce the submitted JSON Schema
When callers use standard JSON Schema constraints outside this small hand-coded subset—for example, { "type": "number", "minimum": 10 }—a Moondream result of 5 is accepted and returned as structured; object and array enum values are also incorrectly rejected because Object.is compares references rather than JSON values. This makes the advertised schema check unreliable for downstream automation. Use a compliant validator, or explicitly reject unsupported keywords and implement JSON-value equality for enums.
AGENTS.md reference: AGENTS.md:L43-L43
Useful? React with 👍 / 👎.
Summary
@cf/moondream/moondream3.1-9B-A2B, with no fallback pathai.image.readandimg2txtacross caption, query, OCR, point, and detect modesimg2txtto caption while keeping query prompts caller-ownedCompanion user/agent manual update: deathbyknowledge/gsv-manual#1
Validation
ChatTranscript.test.tsbootstrap failure onDOMPurify().addHookremains reproducible onorigin/main