[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M792D7YB62Y82CCAMDQH08F9":3,"skill-same:01M792D7YB62Y82CCAMDQH08F9":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M792D7YB62Y82CCAMDQH08F9","langchain-model-inference",null,"Invoke Claude, GPT-4o, and Gemini through LangChain 1.0 without tripping on\nthe content-block, token-accounting, and structured-output quirks that silently\nbreak production code. Use when initializing chat models, routing across providers,\niterating AIMessage content, or choosing a structured-output method.\nTrigger with \"langchain model inference\", \"ChatAnthropic\", \"ChatOpenAI\",\n\"with_structured_output\", \"AIMessage content blocks\", \"langchain routing\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--langchain-py-pack--langchain-model-inference\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: langchain-model-inference\ndescription: |\n  Invoke Claude, GPT-4o, and Gemini through LangChain 1.0 without tripping on\n  the content-block, token-accounting, and structured-output quirks that silently\n  break production code. Use when initializing chat models, routing across providers,\n  iterating AIMessage content, or choosing a structured-output method.\n  Trigger with \"langchain model inference\", \"ChatAnthropic\", \"ChatOpenAI\",\n  \"with_structured_output\", \"AIMessage content blocks\", \"langchain routing\".\nallowed-tools: Read, Write, Edit, Bash(python:*), Bash(pip:*), Grep\nversion: 2.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, langchain, langgraph, python, langchain-1.0, model-inference]\ncompatible-with: claude-code, codex\n---\n\n# LangChain Model Inference (Python)\n\n## Overview\n\n`AIMessage.content` is a `str` on simple OpenAI calls and a `list[dict]` on Claude\nthe instant any `tool_use`, `thinking`, or `image` block enters the response.\nCode that does `message.content.lower()` crashes with\n`AttributeError: 'list' object has no attribute 'lower'` — the #1 first-production-call\nLangChain 1.0 bug on Anthropic. And that is one of four separate \"content shape\"\npitfalls in this skill:\n\n- P02 — `AIMessage.content` list-vs-string divergence\n- P03 — `with_structured_output(method=\"function_calling\")` silently drops\n  `Optional[list[X]]` fields on ~40% of real schemas\n- P05 — `temperature=0` is not deterministic on Anthropic even though it is on OpenAI\n- P58 — Claude expects the system message at position 0; middleware that reorders\n  messages makes it silently ignored\n\nThis skill walks through `ChatAnthropic`, `ChatOpenAI`, and `ChatGoogleGenerativeAI`\ninitialization; model routing; token counting that is actually correct during\nstreaming; content-block iteration; and a decision tree for `with_structured_output`\nmethods that holds up on real schemas. Pin: `langchain-core 1.0.x`,\n`langchain-anthropic 1.0.x`, `langchain-openai 1.0.x`, `langchain-google-genai 1.0.x`.\nPain-catalog anchors: P01, P02, P03, P04, P05, P53, P54, P58, P63, P64, P65.\n\n## Prerequisites\n\n- Python 3.10+\n- `langchain-core >= 1.0, \u003C 2.0`\n- At least one provider package: `pip install langchain-anthropic langchain-openai`\n- Provider API key(s): `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`\n\n## Instructions\n\n### Step 1 — Initialize a chat model with explicit, version-safe defaults\n\n```python\nfrom langchain_anthropic import ChatAnthropic\nfrom langchain_openai import ChatOpenAI\n\nclaude = ChatAnthropic(\n    model=\"claude-sonnet-4-6\",\n    temperature=0,\n    max_tokens=4096,\n    timeout=30,       # seconds. Default is None — hangs forever on provider stall.\n    max_retries=2,    # Retries, not attempts. See P30 in pain catalog.\n)\n\ngpt4o = ChatOpenAI(\n    model=\"gpt-4o\",\n    temperature=0,\n    timeout=30,\n    max_retries=2,\n)\n```\n\nExplicit `timeout` and `max_retries` are not optional in production — the defaults\nare wrong for every workload we have measured. `max_retries=6` (the default on\n`ChatOpenAI`) means a single logical call can bill as **7** requests on flaky\nnetworks.\n\n### Step 2 — Iterate `AIMessage.content` as typed blocks, not strings\n\n```python\nfrom langchain_core.messages import AIMessage\n\ndef extract_text(msg: AIMessage) -> str:\n    \"\"\"Safe on both provider shapes. Works for streaming deltas too.\n\n    Handles both dict blocks (provider-native) and typed block objects\n    (LangChain 1.0 wrappers) — which Gemini, OpenAI tools, and future\n    SDK versions may return.\n    \"\"\"\n    if isinstance(msg.content, str):\n        return msg.content\n    parts = []\n    for block in msg.content:\n        # Block may be a dict (provider-native) or a typed object (1.0 wrapper)\n        block_type = block.get(\"type\") if isinstance(block, dict) else getattr(block, \"type\", None)\n        if block_type == \"text\":\n            parts.append(block[\"text\"] if isinstance(block, dict) else block.text)\n    return \"\".join(parts)\n```\n\n`AIMessage.text()` (1.0+) does this for you in most cases — prefer it. Roll your\nown only when you need to filter by block type (`tool_use`, `image`, `thinking`).\nSee [Content Blocks](references\u002Fcontent-blocks.md) for the full block-type\nreference and streaming-delta shape.\n\n### Step 3 — Route across providers with a factory, not a conditional\n\n```python\nfrom langchain_core.language_models import BaseChatModel\n\n# Version-safe defaults applied to every model the factory builds.\n# Callers can override via **kwargs.\n_SAFE_DEFAULTS = {\"timeout\": 30, \"max_retries\": 2}\n\ndef chat_model(provider: str, **kwargs) -> BaseChatModel:\n    defaults = {**_SAFE_DEFAULTS, **kwargs}  # caller's kwargs win\n    if provider == \"anthropic\":\n        return ChatAnthropic(model=\"claude-sonnet-4-6\", **defaults)\n    if provider == \"openai\":\n        return ChatOpenAI(model=\"gpt-4o\", **defaults)\n    if provider == \"gemini\":\n        from langchain_google_genai import ChatGoogleGenerativeAI\n        return ChatGoogleGenerativeAI(model=\"gemini-2.5-pro\", **defaults)\n    raise ValueError(f\"Unknown provider: {provider!r}\")\n```\n\nA factory centralizes the version-safe defaults from Step 1 (`timeout=30`,\n`max_retries=2`) and the structured-output method pick from Step 5. Chains depend\non the `BaseChatModel` protocol, not the concrete class. Callers override with\n`chat_model(\"openai\", timeout=60)` when they need it.\n\n### Step 4 — Count tokens correctly during streaming\n\n`ChatAnthropic.stream()` does *not* populate `response_metadata[\"token_usage\"]`\nuntil the stream closes (P01). If your cost dashboard reads `on_llm_end`, it\nlags by the stream duration. Use `astream_events(version=\"v2\")`:\n\n```python\nasync for event in claude.astream_events({\"input\": \"...\"}, version=\"v2\"):\n    if event[\"event\"] == \"on_chat_model_stream\":\n        chunk = event[\"data\"][\"chunk\"]\n        if hasattr(chunk, \"usage_metadata\") and chunk.usage_metadata:\n            meter.record(chunk.usage_metadata[\"input_tokens\"],\n                         chunk.usage_metadata[\"output_tokens\"])\n```\n\nSee [Token Accounting](references\u002Ftoken-accounting.md) for per-provider differences\n(Anthropic reports input\u002Foutput\u002Fcache separately; OpenAI aggregates; Gemini\nreports completion-only on stream start).\n\n### Step 5 — Pick the right `with_structured_output` method\n\n| Provider | Model class | Recommended method | Why |\n|---|---|---|---|\n| Anthropic | Claude 3.5+, 4.x | `json_schema` | Provider-enforced, supports `$ref` and unions |\n| OpenAI | GPT-4o, GPT-4-turbo | `json_schema` | Strict schema, `additionalProperties: false` enforced |\n| OpenAI | GPT-3.5, legacy | `function_calling` | Pre-`json_schema` fallback |\n| Gemini | Gemini 2.5 Pro\u002FFlash | `json_schema` | Native structured output in 1.0+ |\n| Any | Older or unknown | `json_mode` + Pydantic validate + retry | JSON-parseable only, no schema enforcement (P54) |\n\n```python\nfrom pydantic import BaseModel, ConfigDict\n\nclass Plan(BaseModel):\n    model_config = ConfigDict(extra=\"ignore\")  # P53 — models add helpful extra fields\n    steps: list[str]\n    estimated_minutes: int\n\nstructured = claude.with_structured_output(Plan, method=\"json_schema\")\nplan = structured.invoke(\"Plan a 3-step deploy\")\n```\n\nAvoid `Optional[list[X]]` fields — they silently return `None` on some providers (P03).\nSee [Structured Output Methods](references\u002Fstructured-output-methods.md) for a\nconcrete comparison matrix and fallback pattern.\n\n## Output\n\n- Chat models initialized with explicit timeouts (30s) and `max_retries=2`\n- Content-safe extractor that handles both `str` and `list[dict]` shapes\n- Factory-based routing with a single `BaseChatModel` return type\n- Streaming token counter that reports incrementally, not at stream end\n- `with_structured_output` chosen per provider capability, with Pydantic validation\n\n## Error Handling\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| `AttributeError: 'list' object has no attribute 'lower'` | Treating Claude `AIMessage.content` as `str` (P02) | Use `msg.text()` or the Step 2 extractor |\n| `ValidationError: extra fields not permitted` | Pydantic v2 strict default; model added fields (P53) | Set `model_config = ConfigDict(extra=\"ignore\")` |\n| `ValidationError: Field required` on `Optional[list[X]]` | `method=\"function_calling\"` drops ambiguous unions (P03) | Switch to `method=\"json_schema\"` |\n| `anthropic.BadRequestError: tool_choice requires tools` | Forcing tool without binding any (P63) | Call `.bind_tools([tool])` before `.with_config(tool_choice=...)` |\n| `google.api_core.exceptions.InvalidArgument: finish_reason=SAFETY` | Gemini default safety thresholds (P65) | Override `safety_settings` per model init or switch provider |\n| Streaming response `response_metadata[\"token_usage\"] == {}` | Stream end not yet reached (P01) | Use `astream_events(version=\"v2\")` |\n| `ImportError: cannot import name 'ChatOpenAI' from 'langchain.chat_models'` | Legacy 0.2 import path (P38) | `from langchain_openai import ChatOpenAI` |\n\n## Examples\n\n### Routing: cheap draft, expensive final\n\nA common pattern — draft with `gpt-4o-mini`, finalize with `claude-sonnet-4-6`.\nThe factory in Step 3 makes this trivial; combined with `with_structured_output`\nthe finalize step returns a typed object.\n\nSee [Provider Quirks](references\u002Fprovider-quirks.md) for the full\ndraft-then-finalize example including the token budget calculation.\n\n### Extracting tool calls from a single-shot response\n\nA classification task that should return one tool call with a typed argument.\nUse `bind_tools([...], tool_choice={\"type\": \"tool\", \"name\": \"Classify\"})` for\na single forced call — but never loop on a forced choice (P63).\n\nSee [Structured Output Methods](references\u002Fstructured-output-methods.md) for the\nworked example and the decision tree for tool vs structured-output for extraction.\n\n### Multi-modal: screenshot plus prompt\n\nImages are passed as content blocks, but the block shape differs between providers\n(P64). LangChain 1.0 abstracts this into a universal `image` content block.\n\nSee [Content Blocks](references\u002Fcontent-blocks.md) for the universal shape and\nper-provider adapter examples.\n\n## Resources\n\n- [LangChain Python: Chat models](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fintegrations\u002Fchat\u002F)\n- [`AIMessage` API reference](https:\u002F\u002Fpython.langchain.com\u002Fapi_reference\u002Fcore\u002Fmessages\u002Flangchain_core.messages.ai.AIMessage.html)\n- [`with_structured_output`](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fhow_to\u002Fstructured_output\u002F)\n- [`astream_events` v2](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fhow_to\u002Fstreaming\u002F#using-stream-events)\n- [LangChain 1.0 release notes](https:\u002F\u002Fblog.langchain.com\u002Flangchain-langgraph-1dot0\u002F)\n- Pack pain catalog: `docs\u002Fpain-catalog.md` (entries P01-P05, P53, P54, P58, P63-P65)\n","# LangChain Model Inference (Python)\n\n## Overview\n\n`AIMessage.content` is a `str` on simple OpenAI calls and a `list[dict]` on Claude\nthe instant any `tool_use`, `thinking`, or `image` block enters the response.\nCode that does `message.content.lower()` crashes with\n`AttributeError: 'list' object has no attribute 'lower'` — the #1 first-production-call\nLangChain 1.0 bug on Anthropic. And that is one of four separate \"content shape\"\npitfalls in this skill:\n\n- P02 — `AIMessage.content` list-vs-string divergence\n- P03 — `with_structured_output(method=\"function_calling\")` silently drops\n  `Optional[list[X]]` fields on ~40% of real schemas\n- P05 — `temperature=0` is not deterministic on Anthropic even though it is on OpenAI\n- P58 — Claude expects the system message at position 0; middleware that reorders\n  messages makes it silently ignored\n\nThis skill walks through `ChatAnthropic`, `ChatOpenAI`, and `ChatGoogleGenerativeAI`\ninitialization; model routing; token counting that is actually correct during\nstreaming; content-block iteration; and a decision tree for `with_structured_output`\nmethods that holds up on real schemas. Pin: `langchain-core 1.0.x`,\n`langchain-anthropic 1.0.x`, `langchain-openai 1.0.x`, `langchain-google-genai 1.0.x`.\nPain-catalog anchors: P01, P02, P03, P04, P05, P53, P54, P58, P63, P64, P65.\n\n## Prerequisites\n\n- Python 3.10+\n- `langchain-core >= 1.0, \u003C 2.0`\n- At least one provider package: `pip install langchain-anthropic langchain-openai`\n- Provider API key(s): `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`\n\n## Instructions\n\n### Step 1 — Initialize a chat model with explicit, version-safe defaults\n\n```python\nfrom langchain_anthropic import ChatAnthropic\nfrom langchain_openai import ChatOpenAI\n\nclaude = ChatAnthropic(\n    model=\"claude-sonnet-4-6\",\n    temperature=0,\n    max_tokens=4096,\n    timeout=30,       # seconds. Default is None — hangs forever on provider stall.\n    max_retries=2,    # Retries, not attempts. See P30 in pain catalog.\n)\n\ngpt4o = ChatOpenAI(\n    model=\"gpt-4o\",\n    temperature=0,\n    timeout=30,\n    max_retries=2,\n)\n```\n\nExplicit `timeout` and `max_retries` are not optional in production — the defaults\nare wrong for every workload we have measured. `max_retries=6` (the default on\n`ChatOpenAI`) means a single logical call can bill as **7** requests on flaky\nnetworks.\n\n### Step 2 — Iterate `AIMessage.content` as typed blocks, not strings\n\n```python\nfrom langchain_core.messages import AIMessage\n\ndef extract_text(msg: AIMessage) -> str:\n    \"\"\"Safe on both provider shapes. Works for streaming deltas too.\n\n    Handles both dict blocks (provider-native) and typed block objects\n    (LangChain 1.0 wrappers) — which Gemini, OpenAI tools, and future\n    SDK versions may return.\n    \"\"\"\n    if isinstance(msg.content, str):\n        return msg.content\n    parts = []\n    for block in msg.content:\n        # Block may be a dict (provider-native) or a typed object (1.0 wrapper)\n        block_type = block.get(\"type\") if isinstance(block, dict) else getattr(block, \"type\", None)\n        if block_type == \"text\":\n            parts.append(block[\"text\"] if isinstance(block, dict) else block.text)\n    return \"\".join(parts)\n```\n\n`AIMessage.text()` (1.0+) does this for you in most cases — prefer it. Roll your\nown only when you need to filter by block type (`tool_use`, `image`, `thinking`).\nSee [Content Blocks](references\u002Fcontent-blocks.md) for the full block-type\nreference and streaming-delta shape.\n\n### Step 3 — Route across providers with a factory, not a conditional\n\n```python\nfrom langchain_core.language_models import BaseChatModel\n\n# Version-safe defaults applied to every model the factory builds.\n# Callers can override via **kwargs.\n_SAFE_DEFAULTS = {\"timeout\": 30, \"max_retries\": 2}\n\ndef chat_model(provider: str, **kwargs) -> BaseChatModel:\n    defaults = {**_SAFE_DEFAULTS, **kwargs}  # caller's kwargs win\n    if provider == \"anthropic\":\n        return ChatAnthropic(model=\"claude-sonnet-4-6\", **defaults)\n    if provider == \"openai\":\n        return ChatOpenAI(model=\"gpt-4o\", **defaults)\n    if provider == \"gemini\":\n        from langchain_google_genai import ChatGoogleGenerativeAI\n        return ChatGoogleGenerativeAI(model=\"gemini-2.5-pro\", **defaults)\n    raise ValueError(f\"Unknown provider: {provider!r}\")\n```\n\nA factory centralizes the version-safe defaults from Step 1 (`timeout=30`,\n`max_retries=2`) and the structured-output method pick from Step 5. Chains depend\non the `BaseChatModel` protocol, not the concrete class. Callers override with\n`chat_model(\"openai\", timeout=60)` when they need it.\n\n### Step 4 — Count tokens correctly during streaming\n\n`ChatAnthropic.stream()` does *not* populate `response_metadata[\"token_usage\"]`\nuntil the stream closes (P01). If your cost dashboard reads `on_llm_end`, it\nlags by the stream duration. Use `astream_events(version=\"v2\")`:\n\n```python\nasync for event in claude.astream_events({\"input\": \"...\"}, version=\"v2\"):\n    if event[\"event\"] == \"on_chat_model_stream\":\n        chunk = event[\"data\"][\"chunk\"]\n        if hasattr(chunk, \"usage_metadata\") and chunk.usage_metadata:\n            meter.record(chunk.usage_metadata[\"input_tokens\"],\n                         chunk.usage_metadata[\"output_tokens\"])\n```\n\nSee [Token Accounting](references\u002Ftoken-accounting.md) for per-provider differences\n(Anthropic reports input\u002Foutput\u002Fcache separately; OpenAI aggregates; Gemini\nreports completion-only on stream start).\n\n### Step 5 — Pick the right `with_structured_output` method\n\n| Provider | Model class | Recommended method | Why |\n|---|---|---|---|\n| Anthropic | Claude 3.5+, 4.x | `json_schema` | Provider-enforced, supports `$ref` and unions |\n| OpenAI | GPT-4o, GPT-4-turbo | `json_schema` | Strict schema, `additionalProperties: false` enforced |\n| OpenAI | GPT-3.5, legacy | `function_calling` | Pre-`json_schema` fallback |\n| Gemini | Gemini 2.5 Pro\u002FFlash | `json_schema` | Native structured output in 1.0+ |\n| Any | Older or unknown | `json_mode` + Pydantic validate + retry | JSON-parseable only, no schema enforcement (P54) |\n\n```python\nfrom pydantic import BaseModel, ConfigDict\n\nclass Plan(BaseModel):\n    model_config = ConfigDict(extra=\"ignore\")  # P53 — models add helpful extra fields\n    steps: list[str]\n    estimated_minutes: int\n\nstructured = claude.with_structured_output(Plan, method=\"json_schema\")\nplan = structured.invoke(\"Plan a 3-step deploy\")\n```\n\nAvoid `Optional[list[X]]` fields — they silently return `None` on some providers (P03).\nSee [Structured Output Methods](references\u002Fstructured-output-methods.md) for a\nconcrete comparison matrix and fallback pattern.\n\n## Output\n\n- Chat models initialized with explicit timeouts (30s) and `max_retries=2`\n- Content-safe extractor that handles both `str` and `list[dict]` shapes\n- Factory-based routing with a single `BaseChatModel` return type\n- Streaming token counter that reports incrementally, not at stream end\n- `with_structured_output` chosen per provider capability, with Pydantic validation\n\n## Error Handling\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| `AttributeError: 'list' object has no attribute 'lower'` | Treating Claude `AIMessage.content` as `str` (P02) | Use `msg.text()` or the Step 2 extractor |\n| `ValidationError: extra fields not permitted` | Pydantic v2 strict default; model added fields (P53) | Set `model_config = ConfigDict(extra=\"ignore\")` |\n| `ValidationError: Field required` on `Optional[list[X]]` | `method=\"function_calling\"` drops ambiguous unions (P03) | Switch to `method=\"json_schema\"` |\n| `anthropic.BadRequestError: tool_choice requires tools` | Forcing tool without binding any (P63) | Call `.bind_tools([tool])` before `.with_config(tool_choice=...)` |\n| `google.api_core.exceptions.InvalidArgument: finish_reason=SAFETY` | Gemini default safety thresholds (P65) | Override `safety_settings` per model init or switch provider |\n| Streaming response `response_metadata[\"token_usage\"] == {}` | Stream end not yet reached (P01) | Use `astream_events(version=\"v2\")` |\n| `ImportError: cannot import name 'ChatOpenAI' from 'langchain.chat_models'` | Legacy 0.2 import path (P38) | `from langchain_openai import ChatOpenAI` |\n\n## Examples\n\n### Routing: cheap draft, expensive final\n\nA common pattern — draft with `gpt-4o-mini`, finalize with `claude-sonnet-4-6`.\nThe factory in Step 3 makes this trivial; combined with `with_structured_output`\nthe finalize step returns a typed object.\n\nSee [Provider Quirks](references\u002Fprovider-quirks.md) for the full\ndraft-then-finalize example including the token budget calculation.\n\n### Extracting tool calls from a single-shot response\n\nA classification task that should return one tool call with a typed argument.\nUse `bind_tools([...], tool_choice={\"type\": \"tool\", \"name\": \"Classify\"})` for\na single forced call — but never loop on a forced choice (P63).\n\nSee [Structured Output Methods](references\u002Fstructured-output-methods.md) for the\nworked example and the decision tree for tool vs structured-output for extraction.\n\n### Multi-modal: screenshot plus prompt\n\nImages are passed as content blocks, but the block shape differs between providers\n(P64). LangChain 1.0 abstracts this into a universal `image` content block.\n\nSee [Content Blocks](references\u002Fcontent-blocks.md) for the universal shape and\nper-provider adapter examples.\n\n## Resources\n\n- [LangChain Python: Chat models](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fintegrations\u002Fchat\u002F)\n- [`AIMessage` API reference](https:\u002F\u002Fpython.langchain.com\u002Fapi_reference\u002Fcore\u002Fmessages\u002Flangchain_core.messages.ai.AIMessage.html)\n- [`with_structured_output`](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fhow_to\u002Fstructured_output\u002F)\n- [`astream_events` v2](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fhow_to\u002Fstreaming\u002F#using-stream-events)\n- [LangChain 1.0 release notes](https:\u002F\u002Fblog.langchain.com\u002Flangchain-langgraph-1dot0\u002F)\n- Pack pain catalog: `docs\u002Fpain-catalog.md` (entries P01-P05, P53, P54, P58, P63-P65)\n",{"name":5,"tags":24,"author":31,"license":15,"version":32,"description":33,"allowed-tools":34,"compatible-with":35},[25,26,27,28,29,30],"saas","langchain","langgraph","python","langchain-1.0","model-inference","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","2.0.0","Invoke Claude, GPT-4o, and Gemini through LangChain 1.0 without tripping on\nthe content-block, token-accounting, and structured-output quirks that silently\nbreak production code. Use when initializing chat models, routing across providers,\niterating AIMessage content, or choosing a structured-output method.\nTrigger with \"langchain model inference\", \"ChatAnthropic\", \"ChatOpenAI\",\n\"with_structured_output\", \"AIMessage content blocks\", \"langchain routing\".\n","Read, Write, Edit, Bash(python:*), Bash(pip:*), Grep","claude-code, codex","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--langchain-py-pack--langchain-model-inference",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill langchain-model-inference",{"tool":51,"command":52},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill langchain-model-inference",{"tool":54,"command":55},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill langchain-model-inference","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--langchain-py-pack--langchain-model-inference\u002FSKILL.md",true,[],[60,67,74,81,88,96],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]