Skip to content

DX-120975: Fix endpoint#113

Merged
aniket-s-kulkarni merged 4 commits into
dremio:mainfrom
AfonsoP1nto:fix_endpoint
May 18, 2026
Merged

DX-120975: Fix endpoint#113
aniket-s-kulkarni merged 4 commits into
dremio:mainfrom
AfonsoP1nto:fix_endpoint

Conversation

@AfonsoP1nto
Copy link
Copy Markdown
Contributor

@AfonsoP1nto AfonsoP1nto commented May 15, 2026

Update AI tool API calls to use the same project-aware endpoint logic as the rest of the Dremio client.

list_tools() and invoke_tool() now call /v0/projects/{project_id}/ai/tools when a project ID is configured.
When no project ID is present, both paths fall back to /api/v3/ai/tools.
Updated tests to cover both project-scoped and non-project-scoped requests, and removed the hardcoded /api/v4/ai/tools Software-only paths.

Validation

python3 -m py_compile src/dremioai/api/dremio/ai_tools.py tests/api/dremio/test_ai_tools.py

Also added a fix to the test_stdlib_logs_are_rendered_as_json test, which had a pre-existing error. The e2e tests that start real uvicorn servers trigger uvicorn's configure_logging(), which applies its default LOGGING_CONFIG — this explicitly sets uvicorn.access.propagate = False. That setting persisted across tests, so when test_stdlib_logs_are_rendered_as_json ran later, the uvicorn.access logger silently swallowed the log message instead of propagating it to the root handler.

Added a reset_uvicorn_logger_propagation autouse fixture to conftest.py that resets propagate=True and clears handlers on uvicorn loggers after each test.

Comment thread src/dremioai/api/dremio/ai_tools.py Outdated
Comment thread src/dremioai/api/dremio/ai_tools.py Outdated
Comment thread src/dremioai/api/dremio/ai_tools.py Outdated
Comment thread src/dremioai/api/dremio/ai_tools.py Outdated
Comment thread tests/api/dremio/test_ai_tools.py Outdated
@AfonsoP1nto AfonsoP1nto changed the title Fix endpoint DX-120975: Fix endpoint May 15, 2026
@aniket-s-kulkarni aniket-s-kulkarni merged commit 658a661 into dremio:main May 18, 2026
3 checks passed
@AfonsoP1nto AfonsoP1nto deleted the fix_endpoint branch May 18, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants