Skip to content
Draft
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
3 changes: 3 additions & 0 deletions .github/workflows/pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ jobs:

- name: Lint (pylint)
run: uv run --group dev pylint src --rcfile pylintrc

- name: Tests (pytest)
run: uv run --group dev pytest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ __pycache__/
.env.*.local
.DS_Store
.venv/
output.zip
7 changes: 5 additions & 2 deletions .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ generation:
python:
version: 1.3.23
additionalDependencies:
dev: {}
main: {}
dev:
pytest: '>=8.3'
pytest-asyncio: '>=0.24'
main:
pydantic: '>=2.11.2,<3'
allowedRedefinedBuiltins:
- id
- object
Expand Down
Empty file removed output.zip
Empty file.
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies = [
"httpcore >=1.0.9",
"httpx >=0.28.1",
"jsonpath-python >=1.0.6",
"pydantic >=2.11.2,<2.13",
"pydantic >=2.11.2,<3",
]
urls.repository = "https://github.com/OpenRouterTeam/python-sdk.git"
license = { text = "Apache-2.0" }
Expand All @@ -19,6 +19,8 @@ dev = [
"mypy ==1.15.0",
"pylint ==3.2.3",
"pyright ==1.1.398",
"pytest >=8.3",
"pytest-asyncio >=0.24",
]

[tool.setuptools.packages.find]
Expand Down
8 changes: 6 additions & 2 deletions tests/test_responses_namespace.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
from openrouter import OpenRouter


def _public_methods(obj):
return {name for name in dir(obj) if not name.startswith("_") and callable(getattr(obj, name))}


def test_responses_namespace_is_ga_and_beta_alias_remains_available():
client = OpenRouter(api_key="test-key")

assert client.responses is not None
assert client.beta.responses is not None
assert type(client.responses) is type(client.beta.responses)
assert client.beta.analytics is not None
assert _public_methods(client.responses) == _public_methods(client.beta.responses)
assert client.analytics is not None
87 changes: 84 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading