github google/langextract v1.7.2

53 minutes ago

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 max_output_tokens as max_completion_tokens to OpenAI (#600).
  • Stop dict_to_annotated_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 max_output_tokens as max_completion_tokens. Other base_url endpoints still receive max_tokens (#600).
  • An explicit extract(temperature=...) now overrides a temperature in language_model_params 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: v1.7.1...v1.7.2

Don't miss a new langextract release

NewReleases is sending notifications on new releases.