Batch API analysis mode (--batch): 50% cheaper bulk runs - #10
Merged
Conversation
🔒 Upgrade RequiredPrivate repository analysis requires Pro or Enterprise. Upgrade: https://ecc.tools/pricing?plan=pro ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers. |
zackkitzmiller
force-pushed
the
feat/batch-analysis
branch
from
June 13, 2026 03:41
c7d691d to
60f81d2
Compare
🔒 Upgrade RequiredPrivate repository analysis requires Pro or Enterprise. Upgrade: https://ecc.tools/pricing?plan=pro ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers. |
Adds a 50%-cheaper asynchronous analysis path using the Messages Batch API, suited to large fire-and-forget organize runs. - New AiProvider::describe_batch with a sequential default impl; ClaudeProvider overrides it: submit to /v1/messages/batches, poll until ended, fetch JSONL results, map per-item outcomes back to submission order (item errors stay individual; batch-level failures fail all items with the shared cause) - describe_image/describe_text refactored onto a shared describe_api_request builder so individual and batch paths build identical requests - analyze_batch branches on AnalyzeOptions.use_batch_api: cache hits and filename fallbacks resolve locally, images and documents are submitted in one batch, videos keep the per-file path (keyframe extraction is multi-request) - --batch CLI flag wires through PipelineConfig
zackkitzmiller
force-pushed
the
feat/batch-analysis
branch
from
June 13, 2026 04:15
60f81d2 to
0c6d26a
Compare
🔒 Upgrade RequiredPrivate repository analysis requires Pro or Enterprise. Upgrade: https://ecc.tools/pricing?plan=pro ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers. |
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
Stacked on #9 (needs
describe_textand the document-extraction path from that PR).Adds an opt-in Batch API path for the analyze pass:
spindle --batch <dirs>. All uncached images and documents are submitted as one message batch (50% cheaper per token), polled until the batch ends, and results are mapped back per file. Cache hits, filename-only fallbacks, and videos resolve through the existing paths.Design
AiProvider::describe_batch(Vec<DescribeRequest>)— default impl falls back to sequential individual calls, so non-batch providers and test mocks work unchangedClaudeProvideroverride: submit → poll (5s interval) → fetch JSONL results; per-item errors stay individual, batch-level failures fail every item with the shared causedescribe_image/describe_textnow share adescribe_api_requestbuilder with the batch path, so both modes send byte-identical request paramscustom_id(req-{index}), tolerating out-of-order JSONL lines; missing ids surface as per-item errorsNot in scope (follow-ups)
Test plan
--batchrun against a real folder once merged with Content-aware classification: analyze document contents, richer prompts, Fable 5 #9