Home / File/ _constants.py — anthropic-sdk-python Source File

_constants.py — anthropic-sdk-python Source File

Architecture documentation for _constants.py, a python file in the anthropic-sdk-python codebase. 1 imports, 5 dependents.

File python AnthropicClient 1 imports 5 dependents

Entity Profile

Dependency Diagram

graph LR
  3d69c2f4_e6b6_2dd4_bdc8_383d4a3bc953["_constants.py"]
  9c26e8a9_1ad2_1174_876a_1fc500ce0eaf["httpx"]
  3d69c2f4_e6b6_2dd4_bdc8_383d4a3bc953 --> 9c26e8a9_1ad2_1174_876a_1fc500ce0eaf
  05a7b67e_1fde_5c25_9b37_cc7e827cb62e["__init__.py"]
  05a7b67e_1fde_5c25_9b37_cc7e827cb62e --> 3d69c2f4_e6b6_2dd4_bdc8_383d4a3bc953
  31e60ad8_cac8_652d_176d_4f7cf7dda1ad["_base_client.py"]
  31e60ad8_cac8_652d_176d_4f7cf7dda1ad --> 3d69c2f4_e6b6_2dd4_bdc8_383d4a3bc953
  f3a9224d_bdab_aa4b_9f5e_877302fb10bc["_legacy_response.py"]
  f3a9224d_bdab_aa4b_9f5e_877302fb10bc --> 3d69c2f4_e6b6_2dd4_bdc8_383d4a3bc953
  3912cc3f_b0e8_a732_b8e2_613b018b830d["_models.py"]
  3912cc3f_b0e8_a732_b8e2_613b018b830d --> 3d69c2f4_e6b6_2dd4_bdc8_383d4a3bc953
  2e9c15bb_de03_aa91_93be_0e05db0a552e["_response.py"]
  2e9c15bb_de03_aa91_93be_0e05db0a552e --> 3d69c2f4_e6b6_2dd4_bdc8_383d4a3bc953
  style 3d69c2f4_e6b6_2dd4_bdc8_383d4a3bc953 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import httpx

RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"

# default timeout is 10 minutes
DEFAULT_TIMEOUT = httpx.Timeout(timeout=10 * 60, connect=5.0)
DEFAULT_MAX_RETRIES = 2
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=1000, max_keepalive_connections=100)

INITIAL_RETRY_DELAY = 0.5
MAX_RETRY_DELAY = 8.0

HUMAN_PROMPT = "\n\nHuman:"

AI_PROMPT = "\n\nAssistant:"

MODEL_NONSTREAMING_TOKENS = {
    "claude-opus-4-20250514": 8_192,
    "claude-opus-4-0": 8_192,
    "claude-4-opus-20250514": 8_192,
    "anthropic.claude-opus-4-20250514-v1:0": 8_192,
    "claude-opus-4@20250514": 8_192,
    "claude-opus-4-1-20250805": 8192,
    "anthropic.claude-opus-4-1-20250805-v1:0": 8192,
    "claude-opus-4-1@20250805": 8192,
}

Dependencies

  • httpx

Frequently Asked Questions

What does _constants.py do?
_constants.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain.
What does _constants.py depend on?
_constants.py imports 1 module(s): httpx.
What files import _constants.py?
_constants.py is imported by 5 file(s): __init__.py, _base_client.py, _legacy_response.py, _models.py, _response.py.
Where is _constants.py in the architecture?
_constants.py is located at src/anthropic/_constants.py (domain: AnthropicClient, directory: src/anthropic).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free