Skip to content

Releases: ProjAnvil/langchain-golang

v0.11.0 — Jev/TypeSafe + OpenAI Decisions, SSRF hardening, exa & nomic partners

Choose a tag to compare

@HoweChen HoweChen released this 13 Oct 01:34

🎯 Highlights

Parity wave 3 — upstream releases of 2026-10-08 (langchain-core 1.6.9 · langchain 1.4.4 · openai 1.7.0) plus the TypeSafe/Jev partner and provider catch-up. Spec and plan (with two subagent audit rounds) live in docs/superpowers/{specs,plans}/2026-10-12-parity-wave3*; the gap analysis is reports/13-latest-release-port-gap.md.

  • TypeSafe (Jev) decision model (partners/typesafe, langchain-typesafe 0.0.1a3 #40542/#40570/#40659): Noul/Choice/Score typed questions with probability/confidence answers, recursive state serialization (LangChain messages anywhere inside JSON), a /v1/systemone client with Bearer auth, and a typed APIError layer embedding lcerrors.ProviderError — safe Error() that never leaks body/headers while errors.Is sentinels and errors.As both work. Experimental AutoModeMiddleware (Noul risk gate, fail-closed, threshold 0.5) and ModelRouterMiddleware (Choice-based per-run routing, JSON-native model_route state).
  • OpenAI Decisions API (#41125): partners/openai/decisions — Predicate/Choice/Score questions, OpenAI-shape message mapping (text/input_text, images/input_image, other media rejected), string/Human-sequence/JSON input assembly, POST /decisions with lcerrors mapping and answer normalization — plus AutoMode (with-images/text-only variants, 400/413 downgrade, verbatim blocked/refused notices) and ModelRouter (per-call model override via WithModel, omit-payload trace policy) middleware. Both providers port 1:1 and are pinned by end-to-end CreateAgent tests.
  • SSRF hardening (langchain core #41151): IPv4-compatible (::/96, int>1) addresses unwrap onto the IPv4 check path — verified exploitable before the fix, ::127.0.0.1, ::10.0.0.5, and ::169.254.169.254 no longer bypass loopback/private/cloud-metadata rules; the NAT64 discovery prefix 64:ff9b:1::/48 joins the blocked ranges. Pinned at the validator, URL, and transport layers.
  • Summarization overflow recovery (#41159): the summary step retries once on ErrModelContextOverflow with the middle of the history cut out — budget half the measured tokens, capped at 40% of the model profile's max_input_tokens, head keeps the objective and tail the recent turns; non-overflow errors propagate unchanged.
  • Provider catch-up: exa (exa_search_results_json / exa_find_similar_results_json tools + SearchRetriever, REST-direct, exa 1.1.0 parameter surface) and nomic (text embeddings via the Atlas API with method-driven task_type defaults and Matryoshka dimensionality, nomic 1.0.1). huggingface and qdrant are deferred (large packages, demand-triggered).

📚 Documentation

  • Bilingual (EN + zh-CN) README What's New for v0.11.0; partner tables gain the TypeSafe/Exa/Nomic rows and a Decisions/Tools column; env-var list extended (TYPESAFE_API_KEY, EXA_API_KEY, NOMIC_API_KEY).
  • Sixteen new DIVERGENCES entries from the wave (gateway/run-tree usage scope, question serialization order, tool-layer trace policy, blocked-ToolMessage status, ModelRouter error semantics, provider-specific behaviors).

✅ Quality gates

  • go test ./... green across all 78 root packages; sqlite / redis / postgres checkpoint modules green (make test-sqlite test-redis test-postgres).
  • golangci-lint: 0 issues repo-wide.
  • New/changed packages coverage 95.4%–100% (security 99.3%, nomic 100%, decisions 95.4%, openai middleware 97.9%, typesafe 97.1%, typesafe middleware 96.1%).
  • All user-facing strings (blocked/refused notices, default instructions) diffed byte-for-byte against the Python sources; two subagent audits (spec, plan) plus per-task TDD red→green.

v0.10.0 — core-semantics parity: standard model errors, HITL fidelity, delta-channel hydration

Choose a tag to compare

@HoweChen HoweChen released this 06 Oct 09:08

🎯 Highlights

Core-semantics parity with the October 2026 upstream releases — langchain-core 1.6.6 · langchain 1.4.3 · langgraph 1.2.13 — closing every P1 gap from the 2026-10-06 parity report. The branch passed an independent audit pass before merge; audit-driven hardening (durable-serde safety, Python-exact texts, wired filtering) is folded in.

  • Standard model errors (langchain-core #39538): typed classification of provider failures — lcerrors.ModelErrorKind for auth / permission-denied / invalid-request / not-found / rate-limit / server / connection / timeout / context-overflow (400-body sniffing aligned with Python openai's markers), fine-grained ErrModel* sentinels that stay errors.Is-compatible with ErrProvider, ProviderError.IsModelRetryable() following Python's is_retryable defaults, and transport connection-refused/reset classification. Model/Tool retry middleware now default to DefaultRetryOn (Python default_retry_on): classified non-retryable errors stop retrying, unclassified errors still retry. Gemini maps genai APIErrors onto the same hierarchy.
  • Human-in-the-loop fidelity (langchain #40463, #39773): reviewer edits keep the model's original tool call on the AIMessage, record the substituted action in the hitl_edited_tool_calls state key (JSON-native — survives sqlite/postgres checkpointing; rewritten every review round so stale edits cannot leak), swap it in at execution time via WrapToolCall (with tool re-resolution and a loud error when the edited tool does not exist), and prepend the Python-verbatim edit notice naming what actually ran (Executed instead: …). Custom rejection reasons are framed as user rejections; after-tools return-direct routing resolves executed tool names with fallback to the recorded name.
  • Agent robustness (langchain #40530, #39252): invalid tool calls are answered with corrective error ToolMessages — full-history scope, matching _patch_invalid_tool_calls; middleware-internal model calls (tool selection, tool emulation) are marked with callbacks.WithInternalCall and filtered out of messages-mode stream projections and StreamEvents chat-model events.
  • langgraph correctness (#8886, #8548, #9170, #9165, #9142, #9141): interrupt(response_schema=...) surfaces the expected resume-value JSON Schema on run results, GetState, and through the durable checkpoint serde; delta channels now hydrate from ancestor history on every run / resume / new-turn / UpdateState path, so accumulated values survive restarts and update checkpoints include ancestor state; never-written delta channels short-circuit the history walk via ChannelVersions; delta counters advance for registered-but-never-materialized channels and exit-durability flush no longer double-advances. #9103 (answered interrupts must not surface in GetState) is pinned by a defensive test.

📚 Documentation

  • Bilingual (EN + zh-CN) README What's New section for v0.10.0; CHANGELOG follows Keep a Changelog.
  • New DIVERGENCES entries: internal-call filtering mechanism (context token vs stream transformer), response_schema resume-value validation not performed, subgraph delta-channel read boundary.

✅ Quality gates

  • go build / go vet clean; go test ./... green across all 72 root packages; sqlite / redis / postgres checkpoint modules green (make test-sqlite test-redis test-postgres).
  • golangci-lint: 0 issues repo-wide.
  • Coverage gate: every tracked package ≥95% (langgraph/graph 97.9%, core/callbacks 100%, merged 98.3%).

Full Changelog: v0.9.2...v0.10.0

checkpoint/sqlite v0.3.7

Choose a tag to compare

checkpoint/redis v0.3.7

Choose a tag to compare

Pin langchain-golang v0.10.0.

Full Changelog: langgraph/checkpoint/redis/v0.3.6...langgraph/checkpoint/redis/v0.3.7

checkpoint/postgres v0.3.7

Choose a tag to compare

v0.9.2 — coverage hardening: 95% red line enforced in CI

Choose a tag to compare

@HoweChen HoweChen released this 17 Sep 14:58

🎯 Highlights

  • 95% coverage red line, enforced in CI. Every package from the parity catch-up program now sits at ≥95% statement coverage — merged 98.3% across the tracked set (pgvector 99.8%, redisvector 99.2%, MCP 98.6%, Gemini 100%, SQL toolkit 97.7%, Cohere/Jina rerank 98.1%, vectorstores 99.4%, callbacks 100%).
  • A new CI coverage job reports the per-package table to the job summary and fails the build below the threshold; make coverage / make coverage-html expose the same gate locally.

🧪 Testing

  • Error-injection coverage across the new partners, all offline via fakes and mocks: driver/rows failures (pgxmock CloseError/RowError), HTTP 5xx and mid-stream failures, malformed responses, elicitation failure branches, and the SQL guard lexer's full token paths (dollar-quotes, E-strings, nested comments).
  • Env-gated e2e suites are unchanged; their internal logic is now also exercised at the unit layer through injected fakes.
  • Test files follow a strict <source>_test.go (1:1) or semantic feature-prefix naming convention — audited across all tracked packages.

📚 Documentation

  • CONTRIBUTING documents the coverage gate, the tracked package list, and the exemption process.

⚠️ Upgrade Notes

  • No product-code changes in this release — tests, tooling, and docs only. Safe to upgrade.

Full Changelog: v0.9.1...v0.9.2

checkpoint/sqlite v0.3.6

Choose a tag to compare

checkpoint/redis v0.3.6

Choose a tag to compare

checkpoint/postgres v0.3.6

Choose a tag to compare

v0.9.1 — full parity catch-up: RAG stack, MCP, Gemini, SQL toolkit, examples & docs site

Choose a tag to compare

@HoweChen HoweChen released this 16 Sep 21:37

🎯 Highlights

The full parity catch-up release — milestones M1–M3 of the parity catch-up program, shipped together:

  • RAG production stack: a declarative filter DSL across every vector store (SearchOptions + optional OptionSearcher, 11 operators matching Python's SearchArgs.filter), pgvector and Redis (RediSearch) stores, hosted rerankers (Cohere + Jina), and the classic advanced retrievers — MultiQuery, ParentDocument, Ensemble (RRF), ContextualCompression.
  • MCP tool integration following langchain 1.4.0's langchain.mcp blueprint: both connection models, discovery cache modes, the four-quadrant result mapping, elicitation bridged to LangGraph interrupts, and destructiveHint-based human-in-the-loop gating.
  • Native Gemini provider on the official genai SDK — tool calling/choice, structured output, SSE streaming with terminal usage, multimodal inputs; passes all five standardtests chat-model conformance layers.
  • Document loaders: HTML (goquery), Web, and PDF.
  • SQL toolkit: the four SQL tools with read-only guardrails (lexical analysis verified against real bypass attempts — nested-comment hiding, write CTEs, PRAGMA variants).
  • 12 runnable examples and a bilingual mkdocs docs site (six new guides) deployed via GitHub Pages.

✨ What's Changed

RAG stack

  • vectorstores: SearchOptions/OptionSearcher capability interface, filter DSL evaluator + validation, retriever kwargs pass-through, in-memory & chroma adapters (af1b2af)
  • partners/pgvector (pgx/v5: auto DDL + HNSW/IVFFlat, cosine/L2/IP, parameterized jsonb filter SQL, pgxmock tests + env-gated conformance) (c6fb101)
  • partners/redisvector (FT.CREATE/KNN, declared-metadata JSON filtering, RESP2/RESP3 parsing, env-gated conformance vs Redis Stack) (933bd11)
  • retrievers: DocumentCompressor + ContextualCompressionRetriever (9af9be2); MultiQuery/ParentDocument/Ensemble retrievers (1906b50); Cohere + Jina rerank adapters (f118582)

Models & tools

  • partners/mcp — MCP adapter with elicitation→interrupt bridging and HITL gating (f7d3e77); graph.InterruptSupported probe (34b42bd)
  • partners/gemini — native Gemini chat model, full conformance (7b6533b)
  • core/documentloaders — HTML/Web/PDF loaders with golden tests (8a6b385)

Toolkit, examples, docs

  • langchain/toolkits/sqltoolkit — four tools + read-only guardrails + sqlite/postgres introspection (917c7a3)
  • examples/ — 12 runnable examples, offline-runnable by default (25ce7c3)
  • mkdocs-material bilingual site, six new guides, Pages workflow (5381a38); README refresh (7f4dc8e)
  • CI: dependency pin alignment check across modules (8758bec)

Fixed (from milestone audits)

RRF rank base corrected to Python's 1-based semantics; Gemini stream double-Close panic and context leak; MCP connection cleanup on partial startup; bounded waits on elicitation cancel; $between mixed-type validation; MMR double-embedding removed (e70c9b7, 2d599a7, 12b9eae)

⚠️ Upgrade Notes

  • No breaking API changes. All existing interfaces untouched — new capabilities are additive (optional interfaces, new packages, new NodePolicies fields).
  • Vector-store filters use the PostgreSQL operator semantics ($ne/$nin do not match missing fields).
  • SQL toolkit guardrails are lexical: pair them with a read-only database role for a hard guarantee (see DIVERGENCES.md).

Full Changelog: v0.8.1...v0.9.1