feat: enable_metadata_mode for entity extraction (sync spec v0.7.12) - #72
Merged
Conversation
Regenerated from spec v0.7.12 (cloudglue/cloudglue-api-spec#106) and bumped to 0.7.19. Generated (cloudglue/sdk): - enable_metadata_mode on NewExtract, ExtractExtractConfig, and the entities-collection extract_config variants. When enabled, entities are extracted from the file's metadata document (filename, file details, user metadata, connector source metadata) instead of media content: file-level only, flat 1 credit per file, works on metadata-only files, mutually exclusive with enable_transcript_mode. Wrapper (cloudglue/client): - extract.create() and extract.run() build NewExtract with explicit kwargs — plumbed enable_metadata_mode through both, plus enable_transcript_mode which had never been exposed (pre-existing gap; the two flags are documented together as mutually exclusive) - collections.create() passes extract_config as a dict (flows automatically); docstring documents the new mode Verified against the live API (6/6): metadata-mode extract job on a metadata-only grain file completes and yields file-level entities that mirror the connector source metadata (title/platform/participants); metadata+transcript mode combo returns 400; an entities collection with extract_config.enable_metadata_mode extracts the same entities from a connector URL.
amyxst
approved these changes
Jul 24, 2026
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
Syncs the SDK to spec v0.7.12 (cloudglue/cloudglue-api-spec#106) and bumps the package to 0.7.19.
Adds
enable_metadata_modeto extraction configs: entities are extracted from the file's metadata document (filename, file details, user metadata, connector source metadata) instead of the media content — file-level entities only, flat 1 credit per file, works on metadata-only files without ingesting media, mutually exclusive withenable_transcript_mode.Generated (cloudglue/sdk)
NewExtract,ExtractExtractConfig, and both entities-collectionextract_configvariants gain the flagWrapper (cloudglue/client)
extract.create()/extract.run()constructNewExtractwith explicit kwargs, so the flag needed plumbing — addedenable_metadata_modeandenable_transcript_mode(the latter existed in the API but was never exposed by the wrapper; the two are documented together as mutually exclusive)collections.create()passesextract_configas a dict (flows automatically); docstring now documents the new modeTest plan
create/runsignature smoke-tests;NewExtractpayload carries the flag~/Downloads/cloudglue-v0.7.12-sdk-test-results.md): metadata-mode extract viaextract.runon a metadata-only grain file completes with entities mirroring its connector source metadata ({"title": "Amy / KDR", "platform": "grain", "participants": [...]},segment_entitiesempty);enable_metadata_mode+enable_transcript_modereturns 400; an entities collection withextract_config.enable_metadata_modeextracts the same from a connector URL. Job + collection deleted at cleanup.Note
Low Risk
Additive API surface and client kwargs with no changes to default extraction behavior; main risk is callers enabling conflicting modes, which the API rejects with 400.
Overview
Syncs the generated SDK to OpenAPI v0.7.12 and bumps the package to 0.7.19, adding
enable_metadata_modeon entity extraction so jobs can pull structured entities from a file’s metadata document (filename, file details, user metadata, connector source metadata) instead of media—file-level only, flat 1 credit per file, suitable for metadata-only files without ingesting video.The high-level
extract.create()andextract.run()wrappers now forwardenable_metadata_modeand also exposeenable_transcript_mode, which existed in the API but was not previously passed through; the two modes are documented as mutually exclusive.collections.create()documentsextract_config.enable_metadata_mode; the dict-basedextract_configpath picks up the new field via the regenerated models.Reviewed by Cursor Bugbot for commit 53b04a4. Bugbot is set up for automated code reviews on this repo. Configure here.