Skip to content

LCORE-2852: no_tools affects skills#2022

Open
jrobertboos wants to merge 1 commit into
lightspeed-core:mainfrom
jrobertboos:lcore-2852
Open

LCORE-2852: no_tools affects skills#2022
jrobertboos wants to merge 1 commit into
lightspeed-core:mainfrom
jrobertboos:lcore-2852

Conversation

@jrobertboos

@jrobertboos jrobertboos commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Description

When clients set no_tools=true on query or streaming query requests, the agent should not register tool-bearing capabilities (including skills). Previously, no_tools was not passed through to agent construction, so skills could still be attached even when tools were explicitly disabled.

This change threads the no_tools flag from the query and streaming query endpoints into build_agent, and filters out any pydantic-ai capability that exposes a toolset via get_toolset(). A unit test confirms that SkillsCapability is omitted when no_tools=True.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: Cursor
  • Generated by: Cursor

Related Tickets & Documents

  • Related Issue #LCORE-2852
  • Closes #LCORE-2852

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Added unit test test_agent_excludes_tool_capabilities_when_no_tools in tests/unit/utils/test_pydantic_ai.py to verify SkillsCapability is excluded when no_tools=True.
  • Manually verified query and streaming query endpoints with no_tools=true to confirm skills/tool capabilities are not attached to the agent.

Summary by CodeRabbit

  • New Features

    • Added a “no tools” option for query responses, letting requests skip tool-enabled processing when desired.
    • Applied the same option to streaming responses for consistent behavior.
  • Bug Fixes

    • Improved handling of unset tool preferences by defaulting to normal tool usage when no value is provided.
  • Tests

    • Added coverage to confirm tool-related capabilities are excluded when the option is enabled.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@jrobertboos, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a822e3f9-a702-4f95-b893-f8edc6a21339

📥 Commits

Reviewing files that changed from the base of the PR and between 8b0c1cf and 09d13de.

📒 Files selected for processing (6)
  • src/app/endpoints/query.py
  • src/app/endpoints/streaming_query.py
  • src/utils/agents/query.py
  • src/utils/agents/streaming.py
  • src/utils/pydantic_ai.py
  • tests/unit/utils/test_pydantic_ai.py

Walkthrough

A no_tools boolean flag is propagated from the query and streaming query endpoint handlers through retrieve_agent_response and retrieve_agent_response_generator into build_agent and _agent_capabilities, where it filters out AbstractCapability instances whose get_toolset() returns a non-None value.

no_tools flag propagation

Layer / File(s) Summary
Capability filtering and build_agent wiring
src/utils/pydantic_ai.py, tests/unit/utils/test_pydantic_ai.py
_agent_capabilities accepts no_tools: bool = False and filters out AbstractCapability instances with a non-None get_toolset() when enabled. build_agent exposes and forwards the same flag. A new unit test verifies SkillsCapability is excluded when no_tools=True.
Agent response functions accept no_tools
src/utils/agents/query.py, src/utils/agents/streaming.py
retrieve_agent_response and retrieve_agent_response_generator each add no_tools: bool = False, document it, and forward it to build_agent.
Endpoint handlers pass no_tools
src/app/endpoints/query.py, src/app/endpoints/streaming_query.py
Both endpoint handlers extract no_tools from query_request (defaulting to False) and pass it to their respective agent response functions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • tisnik
  • asimurka
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and matches the main change: extending no_tools to affect skill/tool capabilities.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/utils/agents/query.py (1)

292-299: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use Parameters: in this docstring block.

The updated docstring still uses Args:. As per coding guidelines, src/**/*.py functions should follow the repository docstring convention, and based on learnings this repo uses Parameters: rather than Args:.

Suggested fix
-    Args:
+    Parameters:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/agents/query.py` around lines 292 - 299, The docstring for the
function in query.py still uses the nonstandard section header, so update the
parameter documentation block from Args: to Parameters: to match the repository
convention. Keep the existing parameter descriptions and align the change in the
same docstring near the function that lists client, responses_params,
moderation_result, endpoint_path, _original_input, and no_tools.

Sources: Coding guidelines, Learnings

src/app/endpoints/streaming_query.py (1)

337-341: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Pass no_tools through the compaction path
generate_response_with_compaction() calls retrieve_agent_response_generator() without no_tools, so compacted streaming requests ignore query_request.no_tools and can still expose tools. Thread the flag through both calls.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/endpoints/streaming_query.py` around lines 337 - 341, The compaction
flow is dropping the `no_tools` flag, so `generate_response_with_compaction()`
must pass `query_request.no_tools` through to
`retrieve_agent_response_generator()` just like the non-compaction path. Update
the `generate_response_with_compaction` call site and the
`retrieve_agent_response_generator` invocation so the flag is threaded
end-to-end, using the existing `query_request.no_tools if query_request.no_tools
is not None else False` pattern to keep behavior consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/utils/agents/streaming.py`:
- Around line 90-96: The docstring for the function in streaming.py still uses
Args:, but this repository’s Python docstring convention is Parameters:. Update
the docstring block for the SSE generator/turn summary helper to use Parameters:
instead of Args:, keeping the existing parameter descriptions aligned with the
function’s documented symbols such as responses_params, context, endpoint_path,
and no_tools.

In `@src/utils/pydantic_ai.py`:
- Around line 103-110: The docstring for the pydantic-ai capability assembler
uses the wrong section header; update the function docstring in the assemble
capabilities helper to follow the repository convention by replacing the Args
section with Parameters while keeping the same parameter descriptions for skills
and no_tools. Make this change in the docstring associated with the
capability-building function in pydantic_ai.py so it matches the rest of
src/**/*.py.

---

Outside diff comments:
In `@src/app/endpoints/streaming_query.py`:
- Around line 337-341: The compaction flow is dropping the `no_tools` flag, so
`generate_response_with_compaction()` must pass `query_request.no_tools` through
to `retrieve_agent_response_generator()` just like the non-compaction path.
Update the `generate_response_with_compaction` call site and the
`retrieve_agent_response_generator` invocation so the flag is threaded
end-to-end, using the existing `query_request.no_tools if query_request.no_tools
is not None else False` pattern to keep behavior consistent.

In `@src/utils/agents/query.py`:
- Around line 292-299: The docstring for the function in query.py still uses the
nonstandard section header, so update the parameter documentation block from
Args: to Parameters: to match the repository convention. Keep the existing
parameter descriptions and align the change in the same docstring near the
function that lists client, responses_params, moderation_result, endpoint_path,
_original_input, and no_tools.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b08ffb45-209e-49d1-af11-2cf48c850943

📥 Commits

Reviewing files that changed from the base of the PR and between 8733dfe and 8b0c1cf.

📒 Files selected for processing (6)
  • src/app/endpoints/query.py
  • src/app/endpoints/streaming_query.py
  • src/utils/agents/query.py
  • src/utils/agents/streaming.py
  • src/utils/pydantic_ai.py
  • tests/unit/utils/test_pydantic_ai.py
📜 Review details
⏰ Context from checks skipped due to timeout. (18)
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: radon
  • GitHub Check: mypy
  • GitHub Check: spectral
  • GitHub Check: build-pr
  • GitHub Check: Pylinter
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-6-on-pull-request
⚠️ CI failures not shown inline (2)

GitHub Actions: Black / 0_black.txt: LCORE-2852: no_tools affects skills

Conclusion: failure

View job details

##[group]Run uv tool run black --check src tests
 �[36;1muv tool run black --check src tests�[0m
 shell: /usr/bin/bash -e {0}
 env:
   UV_PYTHON: 3.12
   VIRTUAL_ENV: /home/runner/work/lightspeed-stack/lightspeed-stack/.venv
   UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache
 ##[endgroup]
 Downloading black (1.8MiB)
  Downloaded black
 Installed 7 packages in 13ms
 Warning: Python 3.12 cannot parse code formatted for Python 3.13. To fix this: run Black with Python 3.13, set --target-version to py312, or use --fast to skip the safety check. Black's safety check verifies equivalence by parsing the AST, which fails when the running Python is older than the target version.
 would reformat /home/runner/work/lightspeed-stack/lightspeed-stack/src/app/endpoints/query.py
 would reformat /home/runner/work/lightspeed-stack/lightspeed-stack/src/app/endpoints/streaming_query.py
 Oh no! 💥 💔 💥
 2 files would be reformatted, 445 files would be left unchanged.
 ##[error]Process completed with exit code 1.

GitHub Actions: Black / black: LCORE-2852: no_tools affects skills

Conclusion: failure

View job details

##[group]Run uv tool run black --check src tests
 �[36;1muv tool run black --check src tests�[0m
 shell: /usr/bin/bash -e {0}
 env:
   UV_PYTHON: 3.12
   VIRTUAL_ENV: /home/runner/work/lightspeed-stack/lightspeed-stack/.venv
   UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache
 ##[endgroup]
 Downloading black (1.8MiB)
  Downloaded black
 Installed 7 packages in 13ms
 Warning: Python 3.12 cannot parse code formatted for Python 3.13. To fix this: run Black with Python 3.13, set --target-version to py312, or use --fast to skip the safety check. Black's safety check verifies equivalence by parsing the AST, which fails when the running Python is older than the target version.
 would reformat /home/runner/work/lightspeed-stack/lightspeed-stack/src/app/endpoints/query.py
 would reformat /home/runner/work/lightspeed-stack/lightspeed-stack/src/app/endpoints/streaming_query.py
 Oh no! 💥 💔 💥
 2 files would be reformatted, 445 files would be left unchanged.
 ##[error]Process completed with exit code 1.
🧰 Additional context used
📓 Path-based instructions (3)
tests/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

tests/**/*.py: Use pytest for all unit and integration tests; do not use unittest
Use pytest.mark.asyncio marker for async tests

Files:

  • tests/unit/utils/test_pydantic_ai.py
src/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.py: Use absolute imports for internal modules: from authentication import get_auth_dependency
Llama Stack imports: Use from llama_stack_client import AsyncLlamaStackClient
Check constants.py for shared constants before defining new ones
All modules must start with descriptive docstrings explaining purpose
Use logger = get_logger(__name__) from log.py for module logging
All functions must have complete type annotations for parameters and return types, use modern syntax (str | int), and include descriptive docstrings
Use snake_case with descriptive, action-oriented names for functions (get_, validate_, check_)
Avoid in-place parameter modification anti-patterns; return new data structures instead of modifying function parameters
Use async def for I/O operations and external API calls
Use standard log levels with clear purposes: debug() for diagnostic info, info() for program execution, warning() for unexpected events, error() for serious problems
All classes must have descriptive docstrings explaining purpose and use PascalCase with standard suffixes: Configuration, Error/Exception, Resolver, Interface
Abstract classes must use ABC with @abstractmethod decorators
Follow Google Python docstring conventions with required sections: Parameters, Returns, Raises, and Attributes for classes

Files:

  • src/utils/agents/query.py
  • src/app/endpoints/query.py
  • src/app/endpoints/streaming_query.py
  • src/utils/agents/streaming.py
  • src/utils/pydantic_ai.py
src/app/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

src/app/**/*.py: FastAPI dependencies: Import from fastapi module for APIRouter, HTTPException, Request, status, Depends
Use FastAPI HTTPException with appropriate status codes for API endpoints and handle APIConnectionError from Llama Stack

Files:

  • src/app/endpoints/query.py
  • src/app/endpoints/streaming_query.py
🧠 Learnings (3)
📚 Learning: 2026-06-24T13:45:37.249Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 1971
File: src/utils/markdown_repair.py:31-36
Timestamp: 2026-06-24T13:45:37.249Z
Learning: In the lightspeed-stack repository, docstrings must use the section header name "Parameters:" (not "Args:") for function arguments, even if the project references Google Python docstring conventions. Ensure docstrings follow the project’s established "Parameters:" header format for any documented function parameters.

Applied to files:

  • tests/unit/utils/test_pydantic_ai.py
  • src/utils/agents/query.py
  • src/app/endpoints/query.py
  • src/app/endpoints/streaming_query.py
  • src/utils/agents/streaming.py
  • src/utils/pydantic_ai.py
📚 Learning: 2026-01-14T09:37:51.612Z
Learnt from: asimurka
Repo: lightspeed-core/lightspeed-stack PR: 988
File: src/app/endpoints/query.py:319-339
Timestamp: 2026-01-14T09:37:51.612Z
Learning: In the lightspeed-stack repository, when provider_id == "azure", the Azure provider with provider_type "remote::azure" is guaranteed to be present in the providers list. Therefore, avoid defensive StopIteration handling for next() when locating the Azure provider in providers within src/app/endpoints/query.py. This change applies specifically to this file (or nearby provider lookup code) and relies on the invariant that the Azure provider exists; if the invariant could be violated, keep the existing StopIteration handling.

Applied to files:

  • src/app/endpoints/query.py
📚 Learning: 2026-04-06T20:18:07.852Z
Learnt from: major
Repo: lightspeed-core/lightspeed-stack PR: 1463
File: src/app/endpoints/rlsapi_v1.py:266-271
Timestamp: 2026-04-06T20:18:07.852Z
Learning: In the lightspeed-stack codebase, within `src/app/endpoints/` inference/MCP endpoints, treat `tools: Optional[list[Any]]` in MCP tool definitions as an intentional, consistent typing pattern (used across `query`, `responses`, `streaming_query`, `rlsapi_v1`). Do not raise or suggest this as a typing issue during code review; changing it in isolation could break endpoint typing consistency across the codebase.

Applied to files:

  • src/app/endpoints/query.py
  • src/app/endpoints/streaming_query.py
🪛 GitHub Actions: Black / 0_black.txt
src/app/endpoints/query.py

[error] 1-1: Black --check reported formatting issues. This file would be reformatted.

src/app/endpoints/streaming_query.py

[error] 1-1: Black --check reported formatting issues. This file would be reformatted.

🪛 GitHub Actions: Black / black
src/app/endpoints/query.py

[error] 1-1: Black --check failed: would reformat file. Run 'uv tool run black' (or 'black --write') to apply formatting.

src/app/endpoints/streaming_query.py

[error] 1-1: Black --check failed: would reformat file. Run 'uv tool run black' (or 'black --write') to apply formatting.

🔇 Additional comments (5)
src/app/endpoints/query.py (1)

237-237: LGTM!

src/utils/agents/query.py (1)

317-319: LGTM!

src/utils/agents/streaming.py (1)

123-125: LGTM!

src/utils/pydantic_ai.py (1)

10-10: LGTM!

Also applies to: 115-124, 127-131, 150-152, 162-162

tests/unit/utils/test_pydantic_ai.py (1)

348-365: LGTM!

Comment on lines 90 to +96
"""Return the SSE generator and mutable turn summary for an agent run.
Args:
responses_params: Prepared Responses API parameters.
context: Streaming request context and moderation result.
endpoint_path: Endpoint path used for metric labeling.
no_tools: Whether to skip tool processing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use Parameters: in this docstring block.

The updated docstring still uses Args:. As per coding guidelines, src/**/*.py functions should follow the repository docstring convention, and based on learnings this repo uses Parameters: rather than Args:.

Suggested fix
-    Args:
+    Parameters:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"""Return the SSE generator and mutable turn summary for an agent run.
Args:
responses_params: Prepared Responses API parameters.
context: Streaming request context and moderation result.
endpoint_path: Endpoint path used for metric labeling.
no_tools: Whether to skip tool processing.
"""Return the SSE generator and mutable turn summary for an agent run.
Args:
responses_params: Prepared Responses API parameters.
context: Streaming request context and moderation result.
endpoint_path: Endpoint path used for metric labeling.
no_tools: Whether to skip tool processing.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/agents/streaming.py` around lines 90 - 96, The docstring for the
function in streaming.py still uses Args:, but this repository’s Python
docstring convention is Parameters:. Update the docstring block for the SSE
generator/turn summary helper to use Parameters: instead of Args:, keeping the
existing parameter descriptions aligned with the function’s documented symbols
such as responses_params, context, endpoint_path, and no_tools.

Sources: Coding guidelines, Learnings

Comment thread src/utils/pydantic_ai.py
Comment on lines 103 to 110
"""Assemble pydantic-ai capabilities for an LCS agent.
Args:
skills: Agent skills configuration from LCS, or None when skills are disabled.
no_tools: When True, omit capabilities that expose a toolset via ``get_toolset()``.
Returns:
Configured capabilities, or None when no capabilities are enabled.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use Parameters: in this docstring block.

This new docstring section uses Args: instead of the repository-standard header. As per coding guidelines, src/**/*.py functions should follow the repository docstring convention, and based on learnings this repo uses Parameters: rather than Args:.

Suggested fix
-    Args:
+    Parameters:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"""Assemble pydantic-ai capabilities for an LCS agent.
Args:
skills: Agent skills configuration from LCS, or None when skills are disabled.
no_tools: When True, omit capabilities that expose a toolset via ``get_toolset()``.
Returns:
Configured capabilities, or None when no capabilities are enabled.
"""Assemble pydantic-ai capabilities for an LCS agent.
Parameters:
skills: Agent skills configuration from LCS, or None when skills are disabled.
no_tools: When True, omit capabilities that expose a toolset via ``get_toolset()``.
Returns:
Configured capabilities, or None when no capabilities are enabled.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/pydantic_ai.py` around lines 103 - 110, The docstring for the
pydantic-ai capability assembler uses the wrong section header; update the
function docstring in the assemble capabilities helper to follow the repository
convention by replacing the Args section with Parameters while keeping the same
parameter descriptions for skills and no_tools. Make this change in the
docstring associated with the capability-building function in pydantic_ai.py so
it matches the rest of src/**/*.py.

Sources: Coding guidelines, Learnings

@jrobertboos

Copy link
Copy Markdown
Contributor Author

Please Review:

@tisnik tisnik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@asimurka asimurka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM consider my comments as optional

compaction.original_input if compaction.compacted else None,
no_tools=(
query_request.no_tools if query_request.no_tools is not None else False
),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: bool(query_request.no_tools) works as well

Comment thread src/utils/pydantic_ai.py
Configured capabilities, or None when no capabilities are enabled.
"""
capabilities: list[AgentCapability[SkillsCapability]] = []
capabilities: list[AgentCapability[Any]] = []

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: object would be even better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants