| 389 | |
| 390 | def test_build_profile_rejects_run_only_profiles() -> None: |
| 391 | class RunOnlyProfile: |
| 392 | async def run(self, input: ProfileInput) -> ChatResponse: |
| 393 | return ChatResponse.openai_completion({ |
| 394 | "id": "python-profile-run-only", |
| 395 | "object": "chat.completion", |
| 396 | "model": input.request.model, |
| 397 | "choices": [ |
| 398 | { |
| 399 | "index": 0, |
| 400 | "message": {"role": "assistant", "content": "ok"}, |
| 401 | "finish_reason": "stop", |
| 402 | } |
| 403 | ], |
| 404 | }) |
| 405 | |
| 406 | @profile_config("unit-python-run-only", register=False) |
| 407 | class RunOnlyConfig: |