Repository navigation
v0.3.0: Phase 1: GA Search/Extract endpoints, citations, structured output (#6)
[0.3.0] - 2026-04-27
This release migrates Search and Extract to Parallel's v1 GA endpoints, surfaces citations + structured output on the chat model, and bumps the SDK to 0.5.1.
Added
- Canonical naming: new aliases
ChatParallelandParallelSearchToolare the recommended names going forward; the previousChatParallelWebandParallelWebSearchToolcontinue to work indefinitely as aliases (same class objects). - Search/Extract GA endpoints:
ParallelSearchToolandParallelExtractToolnow callclient.search/client.extract(the/v1GA paths). New parameters surfaced from the GA contract on both tools:max_chars_total,client_model,session_id,location(Search). Theadvanced_settingsenvelope is built automatically from the existing flat fields. ChatParallel.with_structured_output(): returns aRunnableproducing a typed object (pydantic model or dict) via Parallel'sresponse_formatJSON-schema on the research models (lite,base,core).method="json_schema"(default),method="json_mode", andmethod="function_calling"(routed tojson_schemafor cross-provider compatibility) are supported. Raises a clearValueErroronmodel="speed"since that model silently ignores structured-output requests.include_raw=Truereturns{"raw", "parsed", "parsing_error"}and properly captures parser failures.- Citations on chat responses: for the research models,
AIMessage.response_metadata["basis"]carries the API's per-field citations / reasoning / confidence list.response_metadata["interaction_id"]is surfaced for multi-turn context chaining;system_fingerprintis forwarded when present. SourcePolicypydantic model inlangchain_parallel._typesmirroring the API'sinclude_domains/exclude_domains/after_date. BothSourcePolicy(...)and a raw dict are accepted onParallelSearchTool.
Deprecated
- Search without
search_queries: calls passing onlyobjectiveroute to the deprecated/v1betaendpoint with aDeprecationWarning. The fallback will be removed in 0.4.0; the Parallel API itself sunsets/v1betano earlier than June 2026. Pairobjectivewithsearch_queries=[...](1-5 keyword strings, 3-6 words each) to use the GA/v1endpoint. - Legacy
modevalues:"fast","one-shot", and"agentic"continue to call the API correctly with aDeprecationWarningmapping them to the GA values ("fast"/"one-shot"→"basic","agentic"→"advanced"). The GA values"basic"and"advanced"are now the canonical set. Extract.excerpts=False: the GA Extract API always returns excerpts and has no flag to disable them; passingFalseis accepted with aDeprecationWarningand ignored. UseExcerptSettings(max_chars_per_result=…)to control per-result size.
Changed
response_metadata["model_name"]: chat completions now emit the LangChain 1.x standard keymodel_name(wasmodel). Tracing systems andlangchain-tests' standard suite check for this name.parallel-webSDK bumped from^0.3.3to^0.5.1. Brings in the v1 GA Search/Extract types,AdvancedSearchSettingsParam/AdvancedExtractSettingsParam, and the FindAll / Task Group / Monitor surfaces (not yet exposed by this integration — seeIMPROVEMENT_PLAN.mdPhase 2).- Slimmed
_client.py: the four hand-rolledParallelSearchClient/AsyncParallelSearchClient/ParallelExtractClient/AsyncParallelExtractClientwrapper classes have been removed in favor of usingparallel.Parallel/parallel.AsyncParalleldirectly. Internal change; no public surface impact. _run/_arundeduped: extracted_finalize_response,_start_text, and_completion_texthelpers on both tools so the sync and async bodies are now ~25 lines each instead of ~50.ParallelExtractTool.full_contentprecedence is now explicit: an explicitFullContentSettings(or dict) on the call always wins over the tool-levelmax_chars_per_extract; the latter only applies whenfull_content=Trueis passed as a plain bool.
Fixed
ChatParallel(model="lite")now actually selects thelitemodel. Pre-0.3.0 theField(alias="model_name")on themodelfield silently swallowed themodel=kwarg and forced callers into the default"speed". BothChatParallel(model="lite")andChatParallel(model_name="lite")work in 0.3.0 — the latter via amodel_validatorthat mapsmodel_name=tomodel=for back-compat.lc_attributesstill serializes the field asmodel_namefor tracing parity.py.typedis now bundled into the wheel via the[tool.poetry] includedirective, so downstreammypyruns see the package's type information.with_structured_output(include_raw=True)correctly populatesparsing_erroron parse failure (previously alwaysNone).
Migration
For most users, no code changes are required. The recommended-but-optional updates to silence deprecation warnings:
- Search: add
search_queries=[…](1-5 keyword strings, 3-6 words each) to use the GA/v1endpoint.# 0.2.x (still works in 0.3.x with a DeprecationWarning; will break in 0.4.0) tool.invoke({"objective": "What are the latest AI breakthroughs?"}) # 0.3.x preferred (GA /v1 endpoint) tool.invoke({ "search_queries": ["latest AI breakthroughs", "AI advances 2026"], "objective": "What are the latest AI breakthroughs?", })
- Search mode: rename
mode="one-shot"/"fast"→mode="basic"andmode="agentic"→mode="advanced". - Chat: prefer
ChatParallel(model="lite")(or"base"/"core") overmodel_name="...". Read citations fromresponse.response_metadata["basis"]and structured outputs viachat.with_structured_output(MyPydanticModel). The old class nameChatParallelWebcontinues to work.