[PR #5938] Update graph-api.md for "Extended example: specifying LLM at runtime" #4734

Closed
opened 2026-02-20 17:50:40 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/5938

State: closed
Merged: Yes


docs (graphapi) : Handle Missing Context in LLM Invocation - Invoking the LLM without explicitly passing a context parameter resulted in the following error:
AttributeError: 'NoneType' object has no attribute 'model_provider'
This occurred because the context was None, and the system attempted to access model_provider. This PR ensures that when context is not provided, an empty context is passed explicitly. This allows the system to correctly fall back to the default value defined in the ContextSchema.model_provider attribute.

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/5938 **State:** closed **Merged:** Yes --- docs (graphapi) : Handle Missing Context in LLM Invocation - Invoking the LLM without explicitly passing a context parameter resulted in the following error: `AttributeError: 'NoneType' object has no attribute 'model_provider'` This occurred because the context was None, and the system attempted to access model_provider. This PR ensures that when context is not provided, an empty context is passed explicitly. This allows the system to correctly fall back to the default value defined in the ContextSchema.model_provider attribute.
yindo added the pull-request label 2026-02-20 17:50:40 -05:00
yindo closed this issue 2026-02-20 17:50:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#4734