# normalize_langsmith_endpoint

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/config/normalize_langsmith_endpoint)

Resolve a LangSmith endpoint shorthand to its canonical URL.

Maps the case-insensitive region aliases `us`/`eu` to the LangSmith SaaS
endpoints so the CLI `--base-url` flag and the TUI `/auth` prompt share one
decode. Any other non-empty value is returned stripped and unchanged (a
self-hosted or proxied URL); empty input returns an empty string.

## Signature

```python
normalize_langsmith_endpoint(
    value: str,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `value` | `str` | Yes | A region alias, a full endpoint URL, or an empty string. |

## Returns

`str`

The canonical endpoint URL, the stripped literal value, or `""`.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/7794b61a6e76230e8c7a49bdce808b3728305914/libs/code/deepagents_code/config.py#L437)