Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/openrtc/provider_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

from __future__ import annotations

from typing import Any, TypeAlias
from typing import TypeAlias

# Values accepted for STT, LLM, and TTS configuration:
# - Provider ID strings (e.g. ``"openai/gpt-4o-mini-transcribe"``) used by LiveKit
# routing and the OpenRTC CLI defaults.
# - Concrete LiveKit plugin instances (e.g. ``livekit.plugins.openai.STT(...)``).
# ``Any`` covers third-party plugin classes without enumerating them here; use
# strings when you want the type checker to stay precise.
ProviderValue: TypeAlias = str | Any
# ``object`` allows any third-party plugin class without enumerating them here;
# use strings when you want the type checker to stay precise.
ProviderValue: TypeAlias = str | object
Comment on lines +11 to +13
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

str | object will be simplified by mypy to just object (since object is a supertype of str), so this alias still loses the intended “string vs provider object” precision. Consider either making the alias simply object and updating the comment accordingly, or introducing a narrower type/Protocol for provider instances so the union remains meaningful for type checking (and so ProviderValue | None doesn’t collapse to object).

Copilot uses AI. Check for mistakes.
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

"""Pytest configuration and shared fixtures.

LiveKit SDK shim (below): if ``livekit.agents`` cannot be imported, we register a
Expand All @@ -19,6 +17,8 @@
release; use the shim mainly for documented minimal environments.
"""

from __future__ import annotations

import importlib
import sys
import types
Expand Down
Loading