{"record":{"id":"d347e4e668f19de5","repo":"NousResearch/hermes-agent","slug":"boto3-boto3-version-does-not-support-convers","errorCode":null,"errorMessage":"boto3 {boto3.__version__} does not support converse_stream (minimum 1.34.59 required). Upgrade with: pip install --upgrade boto3","messagePattern":"boto3 (.+?) does not support converse_stream \\(minimum 1\\.34\\.59 required\\)\\. Upgrade with: pip install --upgrade boto3","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/bedrock_adapter.py","lineNumber":83,"sourceCode":"    \"\"\"Import boto3, raising a clear error if not installed or too old.\"\"\"\n    try:\n        import boto3\n    except ImportError:\n        raise ImportError(\n            \"The 'boto3' package is required for the AWS Bedrock provider. \"\n            \"Install it with: pip install boto3\\n\"\n            \"Or install Hermes with Bedrock support: pip install -e '.[bedrock]'\"\n        )\n    # converse() / converse_stream() were added in boto3 1.34.59.\n    # When Hermes is installed editable into system Python, the system boto3\n    # (e.g. Ubuntu 24.04 ships 1.34.46) may take precedence over the venv\n    # version pinned in pyproject.toml.\n    try:\n        version = tuple(int(x) for x in boto3.__version__.split(\".\")[:3])\n    except (AttributeError, ValueError):\n        return boto3  # can't parse — don't block on version check\n    if version < _MIN_BOTO3_VERSION:\n        raise RuntimeError(\n            f\"boto3 {boto3.__version__} does not support converse_stream \"\n            f\"(minimum 1.34.59 required). Upgrade with: \"\n            f\"pip install --upgrade boto3\"\n        )\n    return boto3\n\n\ndef _get_bedrock_runtime_client(region: str):\n    \"\"\"Get or create a cached ``bedrock-runtime`` client for the given region.\n\n    Uses the default AWS credential chain (env vars → profile → instance role).\n    \"\"\"\n    if region not in _bedrock_runtime_client_cache:\n        boto3 = _require_boto3()\n        _bedrock_runtime_client_cache[region] = boto3.client(\n            \"bedrock-runtime\", region_name=region,\n        )\n    return _bedrock_runtime_client_cache[region]","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/bedrock_adapter.py#L65-L101","documentation":"boto3 is installed but older than 1.34.59, the version that introduced converse()/converse_stream() which the Bedrock adapter is built on. The check exists specifically because editable installs into system Python can shadow the venv's pinned boto3 (e.g. Ubuntu 24.04 ships 1.34.46). Unparseable versions are tolerated; only a confirmed-too-old version raises.","triggerScenarios":"boto3.__version__ parses to < (1,34,59) at _require_boto3() time (agent/bedrock_adapter.py:83) — typically system-site-packages shadowing the venv.","commonSituations":"Editable install into system Python; OS-distributed boto3; long-lived venv with an old pin; CI image with old boto3.","solutions":["pip install --upgrade 'boto3>=1.34.59'.","If a system boto3 shadows the venv: recreate the venv without system-site-packages, or upgrade the system package.","Verify at runtime: python -c \"import boto3; print(boto3.__version__, boto3.__file__)\" — the path must be inside the venv."],"exampleFix":"pip install --upgrade 'boto3>=1.34.59'\npython -c \"import boto3; print(boto3.__version__, boto3.__file__)\"","handlingStrategy":"validation","validationCode":"import boto3\nfrom functools import reduce\nv = tuple(int(x) for x in boto3.__version__.split(\".\")[:3])\nassert v >= (1, 34, 59), f\"boto3 {boto3.__version__} too old for converse_stream — upgrade\"\nassert \".venv\" in boto3.__file__ or \"site-packages\" in boto3.__file__, \"system boto3 may shadow the venv\"","typeGuard":null,"tryCatchPattern":"try:\n    from agent.bedrock_adapter import _require_boto3\n    _require_boto3()\nexcept RuntimeError as e:\n    if \"converse_stream\" in str(e):\n        run(\"pip install --upgrade 'boto3>=1.34.59'\")","preventionTips":["Pin boto3>=1.34.59 with an upper bound in deployment requirements.","Check boto3.__file__ after install to catch system-Python shadowing.","Avoid creating venvs with system-site-packages for Hermes."],"tags":["bedrock","aws","version","dependencies"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}