MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / handler

Function handler

tests/test_feedback.py:65–81  ·  view source on GitHub ↗
(request: httpx.Request)

Source from the content-addressed store, hash-verified

63 )
64
65 def handler(request: httpx.Request) -> httpx.Response:
66 return httpx.Response(
67 200,
68 json={
69 "id": "chatcmpl_feedback",
70 "object": "chat.completion",
71 "created": 1,
72 "model": "minimax/minimax-m2.5",
73 "choices": [{
74 "index": 0,
75 "message": {"role": "assistant", "content": "ok"},
76 "finish_reason": "stop",
77 }],
78 "usage": {"prompt_tokens": 10, "completion_tokens": 1, "total_tokens": 11},
79 },
80 headers={"content-type": "application/json"},
81 )
82
83 async_client = httpx.AsyncClient(transport=httpx.MockTransport(handler))
84 monkeypatch.setattr("uncommon_route.proxy._get_client", lambda: async_client)

Callers 2

_cmd_setupFunction · 0.50
mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected