Repository navigation
feat(models): support AI map edit jobs (PPT-2832) - #334
Merged
Merged
Conversation
PPT-2833. The signage AI provider rows will also serve AI map editing in Concierge, which calls a text/vision model rather than an image model, so a row gains a nullable text_model column (nil means the adapter's default). Map edits reuse the job table as a third kind, MAP_EDIT, which the kind CHECK now admits; one vendor call per job, so the quota unit stays "candidates". sum_candidates and sum_candidates_for_authority take an optional kind so the map quotas are counted apart from the image quotas; usage is grouped by kind as well and UsageRow carries it, with an optional kind filter for the map usage route. An index on (kind, created_at) serves both. Migration 20261014100500000, numbered above the newest merged migration (20261013100500000); renumber before merging if another lands first. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`sum_candidates`, `sum_candidates_for_authority` and `usage` take a kind, a list of kinds or nil. The image quota in rest-api asks for both image kinds at once, which a single kind could not express without two queries. The IN clause is built with one placeholder per label; nil still sums every kind, so the existing call sites are unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provider rows may point at Anthropic: the check constraint takes the new value and the enum answers anthropic?. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Oct 13, 2026
Brings in multiple root groups so the rest-api branch, which pins this branch until it is released, sees the same models as rest-api master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20261014100500000 was taken twice: by alter_signage_ai_for_maps on this branch and by master's alter_groups_allow_multiple_roots. micrate records migrations by version, so whichever ran first stopped the other, and with master merged the multiple-roots migration was skipped and the group specs failed. The two AI map editing migrations move to 20261016100500000 and 20261016110500000. Both are idempotent, so a database that already ran them under the old versions is unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Merge-readiness pass (Steve reported clashes). This PR is now up to date with master and green.
The collision was not Codex's doing. The 12 Oct commit chose a future date (14 Oct) so the migration would sort after master's newest, and master later used the same date pattern. CI: specs pass on crystal latest and unstable. Merge order for the three PPT-2832 PRs: models #334 first, then cut a models release. See rest-api #453 for the pins that need swapping before that PR can merge. 🤖 Generated with Claude Code |
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.
Add MAP_EDIT jobs, an optional provider text model and Anthropic provider support for the Concierge map editor. Keep image and map quota/usage totals separable by job kind.
Includes additive migrations for the column and enum constraints. The API draft depends on this branch. Draft for review and end-to-end testing; do not merge independently of the API rollout.
Validation: branch migrations applied on the isolated local API database; 57 focused API adapter/prompt/controller specs pass against these models. Five browser map-edit comparisons completed with booking IDs preserved. Focused model specs pass: 29 examples against fresh branch migrations. An existing random fixture-name collision was made deterministic.
Companion API: PlaceOS/rest-api#453
Frontend: PlaceOS/user-interfaces#570
Companion drafts: Frontend #570, API #453, Models #334.