Open
Conversation
a302413 to
23f7433
Compare
Backend microservice that accepts a base64-encoded image and returns the most visually similar icons from @gravity-ui/icons using CLIP embeddings and cosine similarity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use @huggingface/transformers to run CLIP model directly in the Next.js API route, eliminating the need for a separate Python FastAPI service at runtime. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Eliminates user-controlled topK parameter to prevent DoS via unbounded result sizes. Always returns top 10 results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- API now accepts raw binary body with Content-Type header - Validates file type (png/jpeg only) and size (max 4MB) - Client sends File/Blob directly, no base64 conversion - Uses URL.createObjectURL for preview instead of data URLs - Properly revokes object URLs to prevent memory leaks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Job-level permissions (pull-requests: write, contents: write) are sufficient. Top-level write-all violated least privilege. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Return generic error message to client, keep detailed error logging server-side only to prevent information disclosure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allows the server to retry initialization on subsequent requests instead of permanently caching the rejected promise. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents accidentally committing model cache, rendered PNGs, or other artifacts produced during the embedding computation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Was only available as a transitive dependency, which is fragile and could break on dependency tree changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Eliminates copy-paste of the same function across icon-search-model.ts, evaluate.ts, and test-examples.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d3cbee5 to
a29375f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.