Coverage for src/fastoai/routers/beta/__init__.py: 100%

1 from typing import Annotated, Literal

2

3 from fastapi import APIRouter, Depends, Header

4

5 from .assistants import router as beta_router

6 from .messages import router as messages_router

7 from .run_steps import router as run_steps_router

8 from .runs import router as runs_router

9 from .threads import router as threads_router

10

11

12 def required_beta_header(

13 _: Annotated[Literal["assistants=v2"], Header(alias="OpenAI-Beta")],

14): ...

15

16

17 router = APIRouter(tags=["Assistants"], dependencies=[Depends(required_beta_header)])

18 router.include_router(beta_router)

19 router.include_router(threads_router)

20 router.include_router(messages_router)

21 router.include_router(runs_router)

22 router.include_router(run_steps_router)