5 matches across 1 files for error path:libs/partners/openai/langchain_openai/chat_models/base.py
snippet_mode: auto · sorted by relevance
libs/partners/openai/langchain_openai/chat_models/base.py PYTHON 5 matches view file →
552
553
554class OpenAIContextOverflowError(openai.BadRequestError, ContextOverflowError):
555 """BadRequestError raised when input exceeds OpenAI's context limit."""
556
· · ·
557
558class OpenAIAPIContextOverflowError(openai.APIError, ContextOverflowError):
559 """APIError raised when input exceeds OpenAI's context limit."""
560
· · ·
561
562def _handle_openai_bad_request(e: openai.BadRequestError) -> None:
563 if (
564 "context_length_exceeded" in str(e)
· · ·
594
595
596def _handle_openai_api_error(e: openai.APIError) -> None:
597 error_message = str(e)
598 if "exceeds the context window" in error_message:
· · ·
4163
4164
4165class OpenAIRefusalError(Exception):
4166 """Error raised when OpenAI Structured Outputs API returns a refusal.
4167
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.