Skip to content

LangSmith API. HTTPError('403 Client Error: Forbidden for url: https://api.smith.langchain.com/runs/multipart', '{"error":"Forbidden"}\n') #2492

Description

Issue you'd like to raise.

Background (No idea if it is relevant): I have a personal account and an organizational account with my company under the same email.

  1. Problem: I am trying to get the onboarding to work but keep hitting 403s everywhere.

  2. System run: using uv paired with python

  3. My system dependencies (toml):

dependencies = [
    "elevenlabs>=2.27.0",
    "ipython>=9.8.0",
    "langchain>=1.1.3",
    "langchain-openai>=1.1.3",
    "langgraph>=1.0.5",
    "matplotlib>=3.10.8",
    "numpy>=2.3.5",
    "python-dotenv>=1.2.1",
    "scikit-learn>=1.8.0",
    "websockets>=15.0.1",
    "aiofiles>=25.1.0",
    "aiohttp[speedups]>=3.13.3",
    "dateparser>=1.3.0",
    "fastapi>=0.129.0",
    "gunicorn>=25.1.0",
    "httpx[http2]>=0.28.1",
    "pydantic>=2.12.5",
    "pydantic-core>=2.41.5",
    "requests>=2.32.5",
    "structlog>=25.5.0",
    "uvicorn[standard]>=0.41.0",
    "langsmith>=0.7.7",
]

$ uv pip show langsmith
Name: langsmith
Version: 0.7.7
Location: /home/.venv/lib/python3.12/site-packages
Requires: httpx, orjson, packaging, pydantic, requests, requests-toolbelt, uuid-utils, xxhash, zstandard
Required-by: langchain-core

  1. The.env file looks like this:
# LLM API key
OPENAI_API_KEY=sk-proj-redacted
# LangSmith Configuration
LANGSMITH_TRACING=true
LANGSMITH_ENDPOINT=https://api.smith.langchain.com -> I double checked, this is correct!
LANGSMITH_API_KEY=lsv2_pt_redacted
LANGSMITH_PROJECT=development_conversation_agent
LANGSMITH_WORKSPACE_ID=4c112d07-redacted -> I triple check for the project and workspace UUID, actually tried both, none worked
  1. The offending code
import os
from dotenv import load_dotenv
load_dotenv()

from langchain.agents import create_agent

print(os.getenv('LANGSMITH_API_KEY')[:10]) -> this is printing!

def get_weather(city: str) -> str:
    """Get weather for a given city."""
    return f"It's always sunny in {city}!"


agent = create_agent(
    model="openai:gpt-5-mini",
    tools=[get_weather],
    system_prompt="You are a helpful assistant",
)

# Run the agent
agent.invoke(
    {"messages": [{"role": "user", "content": "What is the weather in San Francisco?"}]}
    )
  1. run as uv run python test_lansmith_connection.py, exact output from terminal
lsv2_sk_ca
Failed to multipart ingest runs: langsmith.utils.LangSmithError: Failed to POST https://api.smith.langchain.com/runs/multipart in LangSmith API. HTTPError('403 Client Error: Forbidden for url: https://api.smith.langchain.com/runs/multipart', '{"error":"Forbidden"}\n')
Failed to send compressed multipart ingest: langsmith.utils.LangSmithError: Failed to POST https://api.smith.langchain.com/runs/multipart in LangSmith API. HTTPError('403 Client Error: Forbidden for url: https://api.smith.langchain.com/runs/multipart', '{"error":"Forbidden"}\n')
Failed to send compressed multipart ingest: langsmith.utils.LangSmithError: Failed to POST https://api.smith.langchain.com/runs/multipart in LangSmith API. HTTPError('403 Client Error: Forbidden for url: https://api.smith.langchain.com/runs/multipart', '{"error":"Forbidden"}\n')
  1. Used a key generated on the fly during onborading session (didn't work), tried service key and manually creating a key from the workspace (didn't work)

  2. Last step: spend hours fighting with Chatgpt, Claude, polly and random fixes from the internet with no success =C

Suggestion:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions