new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

LangChain & LangGraph · all subjects

models & providers

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Model specification with provider:model format

The simplest way to specify a model is using a 'provider:model' string format. Examples include 'openai:gpt-5.5' for OpenAI, 'anthropic:claude-sonnet-4-6' for Anthropic, and 'google_genai:gemini-3.6-flash' for Google Gemini. The provider's API key should be added to .env for the model to work locally and in deployment.

LangChain chat model instance configuration

Instead of using a provider:model string, you can pass a LangChain chat model instance to the model parameter when you need to configure model parameters in code.

LangSmith Gateway configuration for Managed Deep Agents

To use LangSmith Gateway with Managed Deep Agents for controlling rate limits and fallbacks: use the ChatOpenAI model directly, set the base_url (Python) or baseURL (JavaScript) to 'https://gateway.smith.langchain.com/v1', and set the LANGSMITH_GATEWAY_API_KEY environment variable to your LangSmith API key. When using Gateway, the model slug format is 'provider/model-name' (with forward slash). Without Gateway, the format is normally 'provider:model-name' (with colon).

LangSmith Gateway example with ChatOpenAI (Python)

```python import os from managed_deepagents import define_deep_agent from langchain_openai import ChatOpenAI api_key = os.environ.get( "LANGSMITH_GATEWAY_API_KEY", "missing-langsmith-gateway-api-key", ) base_url = "https://gateway.smith.langchain.com/v1" agent = define_deep_agent( name="my-agent", model=ChatOpenAI( model="moonshotai/Kimi-K3", api_key=api_key, base_url=base_url, ), ) ``` This example shows how to configure a Managed Deep Agent to use LangSmith Gateway with a ChatOpenAI model.

LangSmith Gateway example with ChatOpenAI (JavaScript)

```ts import { defineDeepAgent } from "managed-deepagents"; import { ChatOpenAI } from "@langchain/openai"; const apiKey = process.env.LANGSMITH_GATEWAY_API_KEY ?? "missing-langsmith-gateway-api-key"; const baseURL = "https://gateway.smith.langchain.com/v1"; export const agent = defineDeepAgent({ name: "my-agent", model: new ChatOpenAI({ model: "moonshotai/Kimi-K3", apiKey, configuration: { baseURL }, }), }); ``` This example shows how to configure a Managed Deep Agent to use LangSmith Gateway with a ChatOpenAI model in JavaScript.

Give your agent this brain