(request: httpx.Request)
| 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) |
no outgoing calls
no test coverage detected