Repository navigation
Generation through Gecko Suite behind AI_BACKEND (SA-3) - #59
Merged
Merged
Conversation
With AI_BACKEND=suite a generation's fal.ai requests go to the suite's media jobs instead of to fal with a key from Settings. generation/backend.py is the seam: run.py needs submit, status, result and cancel of fal and the bill, and gets them from fal directly (local, as always) or from the suite. In suite mode the job persists the suite's job id rather than fal's URLs, so a restart resumes by id and this app never holds an address the key is sent to; the suite records the cost under GAM and the asset, so GAM writes no usage row for it. The model catalogue and request builder stay here. Settings points at the suite's providers instead of asking for a key nothing would read. The fal-key precheck is skipped in suite mode: the suite says so itself if there is none. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1geD2ELWgL2sDpxYbx3Aw
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.
Summary
GAM's half of M3a (gecko-suite#5 is the suite's): SA-3 in the suite's plan. Depends on that PR being merged and deployed first. Merging this changes nothing until
AI_BACKEND=suite, which is already how enrichment and the assistant are switched.With
AI_BACKEND=suite, a generation's fal.ai requests go to the suite's media jobs instead of to fal with a key from Settings.generation/backend.pyis the seam.run.pyneeds submit, status, result and cancel of fal, and the bill; it now gets them from fal directly (local, as always) or from the suite. The job itself (request body, downloads, saving, provenance, resumption) is unchanged./api/generateis skipped in suite mode: the suite says so in the activity feed if it has no fal key.requirements.txtpinsgecko-suite-clientto the suite PR's commit (the one withSuiteMedia). I'll re-pin tomainonce that merges.Test plan
cd backend && pytest -q: 1528 passed (9 new for suite mode: a generation end to end with no GAM key and no GAM usage row, the queue and the suite blinking, a failed run, the suite's own sentence reaching the activity feed, the suite down at submit, resuming by job id without submitting again, cancelling at the suite, handle round trips, and local mode unchanged).cd frontend && npm run format:check && npm run lint && npm test && npm run build: 472 tests passed.Deployment
Merging and redeploying changes nothing for users until
AI_BACKEND=suite.AI_BACKEND=suiteandSUITE_APP_SECRETare already set if enrichment is on the suite.curl -f http://localhost:${APP_PORT}/api/healthAI_BACKEND=suite, Settings shows "uses the fal.ai key kept in Gecko Suite". Generate an image: it appears in the library, and the suite's Usage has animagerow under GAM with the asset as its subject. GAM's own Usage panel will not show it, because the suite counts it.AI_BACKEND=localanddocker compose up -d; the fal key in Settings is still there. A generation running at that moment fails and can be retried.Generated by Claude Code