mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-02 02:11:58 +00:00
docs(proxy): point mcp_server test references at tests/unit/proxy (#44055)
* docs(proxy): point mcp_server test references at tests/unit/proxy The legacy tests/test_litellm/proxy tree was removed in #44018. Repoint the mcp_server AGENTS.md mirror path, swap its auth example for a module that still exists, and drop the utils.py comment block that named the old test path * docs(proxy): fix remaining mcp_server legacy test path and note import-time env reads Repoint the second tests/test_litellm reference in the mcp_server AGENTS.md Tests section and move the import-time env guidance there from the removed utils.py comment
This commit is contained in:
parent
e725832cd8
commit
c030191be6
2 changed files with 8 additions and 11 deletions
|
|
@ -89,14 +89,19 @@ module materially harder to understand.
|
|||
|
||||
## Tests
|
||||
|
||||
Mirror this package under `tests/test_litellm/proxy/_experimental/mcp_server/`.
|
||||
Mirror this package under `tests/unit/proxy/_experimental/mcp_server/`.
|
||||
For regressions, extend the existing mapped test file instead of creating a new
|
||||
one. Use subdirectories that match the implementation path, such as
|
||||
`auth/test_token_exchange.py` for `auth/token_exchange.py` and
|
||||
`auth/test_token_endpoint_auth.py` for `auth/token_endpoint_auth.py` and
|
||||
`guardrail_translation/test_mcp_guardrail_handler.py` for
|
||||
`guardrail_translation/handler.py`.
|
||||
|
||||
Use `tests/mcp_tests/` only when extending an existing broader MCP integration
|
||||
scenario that already lives there. Route, auth, tool listing, tool execution,
|
||||
OAuth, sampling, elicitation, DB, and dashboard-session changes should have
|
||||
focused coverage in the mirrored `tests/test_litellm/...` path first.
|
||||
focused coverage in the mirrored `tests/unit/proxy/...` path first.
|
||||
|
||||
The environment-backed constants in `utils.py` (`LITELLM_MCP_SERVER_NAME`,
|
||||
`LITELLM_MCP_SERVER_DESCRIPTION`, `MCP_TOOL_PREFIX_SEPARATOR`) are read once at
|
||||
import time. Tests that override those variables must reload the module, as
|
||||
`test_mcp_server_identity_env.py` does, or they assert against stale values.
|
||||
|
|
|
|||
|
|
@ -40,14 +40,6 @@ class McpServerPayloadLike(Protocol):
|
|||
def tool_name_to_display_name(self) -> Mapping[str, str] | None: ...
|
||||
|
||||
|
||||
# Constants
|
||||
#
|
||||
# NOTE: The environment-backed values below are read once, when this module is
|
||||
# first imported, and cached for the lifetime of the process. Changing the
|
||||
# corresponding environment variables after import has no effect unless the
|
||||
# module is reloaded (e.g. ``importlib.reload``). Tests that override these
|
||||
# variables must reload this module — see
|
||||
# ``tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_identity_env.py``.
|
||||
LITELLM_MCP_SERVER_NAME: Final = os.environ.get("LITELLM_MCP_SERVER_NAME", "litellm-mcp-server")
|
||||
LITELLM_MCP_SERVER_VERSION: Final = "1.0.0"
|
||||
LITELLM_MCP_SERVER_DESCRIPTION: Final = os.environ.get("LITELLM_MCP_SERVER_DESCRIPTION", "MCP Server for LiteLLM")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue