v1.7.22026-11-07
Highlights
- Support google-genai 3.0, which replaced httpx with httpx2, so Gemini retries transient network errors again (#605).
- Escape extraction data embedded in visualize() output (#573) and declare a UTF-8 charset in visualization HTML (#466).
- Route gpt-6 model IDs to the OpenAI provider (#599) and send maxoutputtokens as maxcompletiontokens to OpenAI (#600).
- Stop dicttoannotated_document from mutating its input (#577), load annotated documents saved with null extractions (#584), and retokenize a Document after its text changes (#583).
- Preserve literal strings such as NA and NULL when loading CSV datasets (#556).
- Apply explicit temperature consistently in extract() (#571) and skip empty extraction values that cannot be grounded (#567).
- Fix URL fetching and file encoding in documentation and examples (#550, #572).
- Add a pull request security check, harden CI workflows, pin GitHub Actions to commit SHAs, and update live API tests (CI only; #566, #569, #594, #595, #601, #606).
Compatibility notes
- Requests to api.openai.com (including regional .api.openai.com endpoints) now send maxoutputtokens as maxcompletiontokens. Other baseurl endpoints still receive max_tokens (#600).
- An explicit extract(temperature=...) now overrides a temperature in languagemodelparams or config.provider_kwargs, and is forwarded when config is used. With a pre-built model, it is ignored with a warning (#571).
- CSV dataset loading now keeps values such as "NA", "NULL", and empty fields as strings instead of reading them as missing (NaN) values (#556).
- Empty or whitespace-only extraction values are now skipped instead of producing ungrounded extractions (#567).
Full Changelog: https://github.com/google/langextract/compare/v1.7.1...v1.7.2
v1.7.12026-10-08
Highlights
- Fix Gemini thinking configuration passthrough, batch tool placement, and typed configuration serialization (#553).
- Fix Vertex AI batch jobs failing at import when google_search is configured without options (#561).
- Surface blocked or failed Gemini batch items instead of returning empty output (#537).
- Fix legacy format_type normalization in extraction (#544).
- Release completed prompts before building the next batch, reducing retained memory (#543).
- Clarify suppressed parsing errors (#521).
- Harden fork live tests and dispatch them from main (CI only; #552).
Compatibility notes
- In batch mode with the default ignoreitemerrors=False, blocked items, items with a Vertex AI error status, and items that return no text with a finish reason other than STOP (for example, MAXTOKENS) now raise InferenceRuntimeError instead of returning empty output, and results from that call are not cached. Set ignoreitem_errors=True to continue past them (#537).
- A thinking_config passed to the Gemini provider is now sent to the API; v1.7.0 ignored it. Callers that already set it may see different output, latency, or cost, or an API error if the model rejects the setting (#553).
- Batch cache keys now include tools. Cache entries written by v1.7.0 will not be reused, even for requests without tools, and repeated requests may incur new API charges (#553).
- In strict mode, empty cached batch results are rechecked, because the cache cannot distinguish a genuine empty completion from a previously ignored failure. This may repeat requests and incur API charges. Nonempty cache hits and explicit ignore mode are unchanged (#537).
- In Vertex AI batch mode, any tool other than googlesearch with an empty configuration, such as codeexecution or url_context, now fails before upload with an InferenceRuntimeError caused by InferenceConfigError. Set an option on the tool if it has one, or disable batch mode (#561).
Full Changelog: https://github.com/google/langextract/compare/v1.7.0...v1.7.1
v1.7.02026-09-13
Highlights
- Improve source alignment for repeated mentions, with an option to retain the previous alignment algorithm (#485).
- Fix provider-plugin generation, generated schemas, and packaging (#513).
- Forward Gemini generation settings, including output-token limits (#509).
- Surface blocked, refused, or missing-text Gemini/OpenAI responses as inference errors (#534).
- Route OpenAI reasoning and GPT-3.5 model IDs correctly and discover reasoning-model API keys automatically (#494).
Compatibility notes
- Repeated-mention source spans may change. Set resolverparams={"exactalignment_algorithm": "difflib"} to retain the previous exact-alignment behavior.
- Callers may now receive an inference error where an unusable model response previously appeared to succeed. Valid empty strings with normal completion remain allowed.
- GPT-3.5 requires useschemaconstraints=False. Explicit output-token limits for OpenAI reasoning models remain a separate follow-up.
Full Changelog: https://github.com/google/langextract/compare/v1.6.0...v1.7.0
v1.6.02026-07-02
Highlights
- Add user-provided output_schema support for Gemini and OpenAI.
- Add Ollama GPT-OSS JSON chat support.
Full Changelog: https://github.com/google/langextract/compare/v1.5.0...v1.6.0
v1.5.02026-05-20
Highlights
- Add OpenAI Batch API support.
- Update the default Gemini Flash model to gemini-3.5-flash.
Full Changelog: https://github.com/google/langextract/compare/v1.4.0...v1.5.0
v1.4.02026-05-15
Highlights
- Add OpenAI structured output schema support.
- Fix Ollama compatibility for newer thinking-capable models.
- Apply additional_context consistently for Document inputs.
Full Changelog: https://github.com/google/langextract/compare/v1.3.0...v1.4.0
v1.3.02026-04-29
What's New
Features
- Add automatic retry logic for transient Gemini API errors (503, 429) with jittered exponential backoff and keyword-only retry knobs (#385, fixes #240)
Security
- Make URL fetching opt-in by default (#449). URLs in input text are no longer auto-fetched; pass an explicit flag to enable.
Performance
- Replace difflib fuzzy aligner with an O(n·m²) LCS DP for significantly faster alignment on large extractions (#442)
Bug Fixes
- Close progress bars cleanly when save/download fails (#434)
- Make IssueKind public and export it in all (#426)
Documentation
- Note that outputname is not sanitized in saveannotated_documents (#451)
- Add langextract-usage Agent Skill (#448)
Full Changelog: https://github.com/google/langextract/compare/v1.2.1...v1.3.0
v1.2.12026-04-08
What's New
Bug Fixes
- Pass reasoning_effort directly to OpenAI API as a top-level Chat Completions parameter (#429)
- Fixes unexpected keyword argument 'reasoning' error when using reasoning models (o1, o3, o4-mini, gpt-5)
- Suppress schema errors in resolve() when suppressparseerrors=True (#435)
- Extends suppression to ValueError from malformed-but-parseable LLM output, not just FormatError
- Fix Ollama Docker example healthcheck (#360)
- Replaces curl (not present in image) with ollama list
Full Changelog: https://github.com/google/langextract/compare/v1.2.0...v1.2.1
v1.2.02026-03-22
What's New
Features
- Cross-chunk context awareness for coreference resolution (#306)
- Resolves pronouns and references across chunk boundaries (e.g., "She" → "Dr. Sarah Johnson")
- New contextwindowchars parameter on extract()
Bug Fixes
- Load builtin providers before resolution regardless of config path (#419)
- Fixes InferenceConfigError when specifying provider by name via ModelConfig(provider='ollama')
- Graceful handling of chunks with no extractable entities (#423)
- suppressparseerrors now defaults to True in extract() so one unparseable chunk does not fail the entire document
- Sanitizes suppress-parse-error log path to exclude raw chunk text
- Send keep_alive at top level for Ollama API (#421)
- Support Enum/dataclass values in GCS batch cache hashing (#359)
- Handle non-Gemini model output parsing edge cases (#300)
Documentation
- Clarify that ungrounded extractions have char_interval=None (#420)
- Clarify best practices for few-shot examples (#302)
Full Changelog: https://github.com/google/langextract/compare/v1.1.1...v1.2.0
v1.1.12025-11-27
What's New
Improvements
- Multi-language tokenizer support with Unicode & Regex (#284)
- Significantly improves support for CJK (Chinese, Japanese, Korean) languages
- Better handling of non-Latin scripts
Bug Fixes
- Fix Gemini Batch API project parameter passing (#286)
- Resolves "Required parameter: project" error when using Vertex AI
Full Changelog: https://github.com/google/langextract/compare/v1.1.0...v1.1.1