feat: Add You.com API Suite to Nvidia AI-Q - #316
Conversation
Signed-off-by: eddyn-you <eddyn@you.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds the ChangesYou.com data source integration
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Builder
participant Register as you_com.register
participant RetryHelper as _run_with_retries
participant YouSearchTool
participant YouResearchTool
participant YouFinanceResearchTool
participant YouContentsTool
Builder->>Register: invoke tool config
Register->>Register: resolve API key
alt API key missing
Register-->>Builder: unavailable FunctionInfo stub
else API key present
Register->>RetryHelper: execute with cache and timeout
RetryHelper->>YouSearchTool: results_async()
RetryHelper->>YouResearchTool: research_text_async()
RetryHelper->>YouFinanceResearchTool: finance_text_async()
RetryHelper->>YouContentsTool: contents_async()
RetryHelper-->>Register: formatted result or error
Register-->>Builder: FunctionInfo
end
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 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 `@sources/you_com/pyproject.toml`:
- Around line 31-35: The dependency list in pyproject.toml uses mixed versioning
styles, with httpx and pydantic lower-bounded and langchain-youdotcom
exact-pinned. Update the dependencies block to follow one consistent pinning
strategy, either by aligning langchain-youdotcom with the others or pinning the
full set together, and if keeping the exact pin, document the reason in the same
configuration area for clarity.
In `@sources/you_com/src/register.py`:
- Around line 260-263: The crawl_timeout field in RegisterRequest only documents
a 1-60 range but does not validate it. Update the Field definition for
crawl_timeout to enforce the same bounds locally (matching the style used by
max_results), so invalid values like 0, negatives, or overly large timeouts are
rejected before reaching the remote API.
- Around line 67-73: FreshnessMode.off is currently defined as None, which makes
FreshnessMode("off") invalid even though off is meant to be a supported option.
Update the FreshnessMode enum in register.py so off uses the string "off", and
then map that enum value back to None at request-building time in the same place
that handles the livecrawl_* options, using the existing freshness/request
construction logic.
- Around line 447-526: The you_contents implementation duplicates the
retry/cache/error-handling logic and the missing-key stub instead of reusing the
shared helpers. Refactor the retry/backoff/cache block in _you_contents to call
_run_with_retries with a closure over urls, formats, and the contents API call,
so future retry or error-mapping changes stay in one place. Also replace the ad
hoc _stub with a parameterized reuse of _make_stub (or extend _make_stub to
support the correct argument name/type for you_contents) so the tool schema and
missing-key message remain consistent.
In `@sources/you_com/tests/test_you_web_search.py`:
- Around line 37-64: The duplicated autouse fixtures and repeated test helper
patterns in the you_com test modules should be centralized to reduce copy-paste
and keep behavior consistent. Move the shared _reset_warn_flag and _clear_env
fixtures from test_you_web_search.py into a shared
sources/you_com/tests/conftest.py so they apply across test_you_research,
test_you_finance_research, and test_you_contents as well, and extract any
compatible common helper setup such as _make_doc-style utilities or repeated
SecretStr/stub/401/timeout patterns into shared helpers where possible. Keep the
module-specific tests focused on their tool behavior and reference the existing
fixture names and register-side state in you_com.register when consolidating.
🪄 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: Enterprise
Run ID: 56b57bc7-823c-4ebc-8bc1-1042adf1e870
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (14)
.secrets.baselinedeploy/.env.examplepyproject.tomlscripts/setup.shsources/you_com/README.mdsources/you_com/pyproject.tomlsources/you_com/src/__init__.pysources/you_com/src/register.pysources/you_com/tests/__init__.pysources/you_com/tests/test_you_contents.pysources/you_com/tests/test_you_finance_research.pysources/you_com/tests/test_you_helpers.pysources/you_com/tests/test_you_research.pysources/you_com/tests/test_you_web_search.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (6)
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run ruff check and ruff format validation for Python code changes
**/*.py: Python code must be linted and formatted with Ruff using line length 120, target Python 3.11, rule sets E,F,W,I,PL,UP, and isort force-single-line configuration
Never commit secrets, tokens, or environment-specific hostnames; use environment variables and SecretStr instead, resolving API keys at runtime
Never print or log secret values, including in tool output or error messages
Missing-secret paths must degrade gracefully (stub/skip), not crash or leak
Do not hand-reformat unrelated code when making changes; match the existing import and formatting style
Files:
sources/you_com/src/__init__.pysources/you_com/tests/test_you_contents.pysources/you_com/tests/test_you_finance_research.pysources/you_com/tests/test_you_helpers.pysources/you_com/tests/test_you_web_search.pysources/you_com/tests/test_you_research.pysources/you_com/src/register.py
sources/**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
New tools and data sources must be NAT functions registered with
@register_functiondecorator
Files:
sources/you_com/src/__init__.pysources/you_com/tests/test_you_contents.pysources/you_com/tests/test_you_finance_research.pysources/you_com/tests/test_you_helpers.pysources/you_com/tests/test_you_web_search.pysources/you_com/tests/test_you_research.pysources/you_com/src/register.py
**
⚙️ CodeRabbit configuration file
**:AI-Q Agent Guidance
Repository-global instructions for coding agents and for humans reviewing
agent-authored changes. These rules apply to every task in this repository.
Task-specific runbooks live in.agents/skills/— load the
relevant skill before starting a workflow it covers.Project overview
AI-Q is an NVIDIA AI Blueprint: an enterprise research agent built on the
NeMo Agent Toolkit (NAT). The deployed product is a research blueprint, not
a general skill runtime. New retrieval sources and tools are NAT functions;
agent behavior is driven by workflow YAML, Jinja2 prompts, and a data-source
registry — not by hard-coded logic.Primary boundaries:
- Backend Python package:
src/aiq_agent/.- Data-source and tool packages:
sources/(each is its own package).- Frontends and tooling:
frontends/(web UI infrontends/ui/, eval harnesses
infrontends/benchmarks/).- Configs, deployment, docs:
configs/,deploy/,docs/.Stay inside this repository. If your workspace also contains adjacent repos
(for example a sibling NeMo-Relay checkout), do not edit them as part of an AI-Q
change. Treatsources/*as independent packages: prefer the smallest change
scoped to the package you are touching.Repository structure
Path Purpose src/aiq_agent/Backend agent, FastAPI extensions, auth, observability, knowledge sources/Data-source / tool packages (e.g. tavily_web_search,google_scholar_paper_search)configs/Workflow YAML configs (e.g. config_cli_default.yml)frontends/ui/Next.js / React / TypeScript / Tailwind / KUI web UI frontends/benchmarks/Eval harnesses: freshqa,deepsearch_qa,deepresearch_benchdeploy/Docker Compose and Helm/Kubernetes assets; deploy/.envfor secretsdocs/source/...
Files:
sources/you_com/src/__init__.pyscripts/setup.shsources/you_com/README.mdsources/you_com/pyproject.tomlpyproject.tomlsources/you_com/tests/test_you_contents.pysources/you_com/tests/test_you_finance_research.pysources/you_com/tests/test_you_helpers.pysources/you_com/tests/test_you_web_search.pysources/you_com/tests/test_you_research.pysources/you_com/src/register.py
{src/aiq_agent/knowledge/**,sources/**}
⚙️ CodeRabbit configuration file
{src/aiq_agent/knowledge/**,sources/**}: Review data-source and knowledge-layer changes for optional dependency boundaries, external API error handling,
retry/rate-limit behavior, deterministic tests, and registration consistency. New source packages should include
package metadata, plugin registration when applicable, and source-level tests.
Files:
sources/you_com/src/__init__.pysources/you_com/README.mdsources/you_com/pyproject.tomlsources/you_com/tests/test_you_contents.pysources/you_com/tests/test_you_finance_research.pysources/you_com/tests/test_you_helpers.pysources/you_com/tests/test_you_web_search.pysources/you_com/tests/test_you_research.pysources/you_com/src/register.py
{.github/**,ci/**,.pre-commit-config.yaml,pyproject.toml,uv.lock}
⚙️ CodeRabbit configuration file
{.github/**,ci/**,.pre-commit-config.yaml,pyproject.toml,uv.lock}: Review automation and packaging changes for least-privilege permissions, pinned versions where appropriate,
copy-pr-bot pull-request/ branch behavior, reproducible uv/npm setup, secret handling, and consistency with
the documented validation matrix.
Files:
pyproject.toml
**/*test*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run pytest for all behavior changes in Python code
Files:
sources/you_com/tests/test_you_contents.pysources/you_com/tests/test_you_finance_research.pysources/you_com/tests/test_you_helpers.pysources/you_com/tests/test_you_web_search.pysources/you_com/tests/test_you_research.py
🪛 LanguageTool
sources/you_com/README.md
[uncategorized] ~10-~10: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...ch/v1-search-post). Supports livecrawl (full page content), freshness filtering, safesear...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[style] ~25-~25: Consider shortening this phrase to just ‘whether’, unless you mean ‘regardless of whether’.
Context: ...e - include_news_results — True/False whether or not you want to include results categorized...
(WHETHER)
🔇 Additional comments (17)
sources/you_com/tests/test_you_research.py (2)
29-40: Same fixture-duplication concern already raised intest_you_web_search.py(lines 37-48).
61-181: LGTM! Retry, 401, timeout, and cache assertions correctly mirror the_run_with_retriescontract.sources/you_com/tests/test_you_finance_research.py (2)
29-40: Same fixture-duplication concern already raised intest_you_web_search.py(lines 37-48).
59-176: LGTM! Validator rejection tests correctly match the finance effort constraint in register.py.sources/you_com/tests/test_you_contents.py (2)
29-40: Same fixture-duplication concern already raised intest_you_web_search.py(lines 37-48).
66-198: LGTM!sources/you_com/tests/test_you_web_search.py (3)
67-86: LGTM!Also applies to: 127-232
109-126: 🎯 Functional CorrectnessKeep the
---assertion_fetch()joins formatted documents with"\n\n---\n\n", so this test matches the implementation.
88-232: 🎯 Functional CorrectnessAsync test collection is already enabled Root
pyproject.tomlsetsasyncio_mode = "auto", so theseasync def test_...methods run without@pytest.mark.asyncio.> Likely an incorrect or invalid review comment.deploy/.env.example (1)
21-21: LGTM!sources/you_com/README.md (1)
1-59: LGTM!sources/you_com/src/__init__.py (1)
1-28: LGTM!sources/you_com/tests/test_you_helpers.py (1)
1-207: LGTM!.secrets.baseline (1)
145-145: LGTM!Also applies to: 358-358
scripts/setup.sh (1)
69-69: LGTM!sources/you_com/pyproject.toml (1)
31-35: 🎯 Functional Correctness
langchain-youdotcom==0.3.1is a valid dependency pin.> Likely an incorrect or invalid review comment.pyproject.toml (1)
205-205: 📐 Maintainability & Code QualityNo change needed for
you-comwiring.you-comis already listed withtavily-web-searchandexa-web-searchin both the dependency group anduv.sources.> Likely an incorrect or invalid review comment.
@AjayThorve, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 31d428b |
Signed-off-by: eddyn-you <eddyn@you.com>
Signed-off-by: eddyn-you <eddyn@you.com>
Signed-off-by: eddyn-you <eddyn@you.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@sources/you_com/tests/test_you_contents.py`:
- Around line 80-83: The out-of-range crawl timeout test is too broad because
`test_crawl_timeout_out_of_range` currently accepts any exception instead of the
intended validation failure. Update the assertion in
`test_crawl_timeout_out_of_range` to expect `pydantic.ValidationError` when
constructing `YouContentsToolConfig(crawl_timeout=bad)`, so the test
specifically verifies the `crawl_timeout` bounds enforced by the model.
🪄 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: Enterprise
Run ID: cfd19028-bba5-4417-919f-ddb776ad5005
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
sources/you_com/src/register.pysources/you_com/tests/test_you_contents.pysources/you_com/tests/test_you_web_search.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (5)
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run ruff check and ruff format validation for Python code changes
**/*.py: Python code must be linted and formatted with Ruff using line length 120, target Python 3.11, rule sets E,F,W,I,PL,UP, and isort force-single-line configuration
Never commit secrets, tokens, or environment-specific hostnames; use environment variables and SecretStr instead, resolving API keys at runtime
Never print or log secret values, including in tool output or error messages
Missing-secret paths must degrade gracefully (stub/skip), not crash or leak
Do not hand-reformat unrelated code when making changes; match the existing import and formatting style
Files:
sources/you_com/tests/test_you_web_search.pysources/you_com/tests/test_you_contents.pysources/you_com/src/register.py
**/*test*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run pytest for all behavior changes in Python code
Files:
sources/you_com/tests/test_you_web_search.pysources/you_com/tests/test_you_contents.py
sources/**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
New tools and data sources must be NAT functions registered with
@register_functiondecorator
Files:
sources/you_com/tests/test_you_web_search.pysources/you_com/tests/test_you_contents.pysources/you_com/src/register.py
**
⚙️ CodeRabbit configuration file
**:AI-Q Agent Guidance
Repository-global instructions for coding agents and for humans reviewing
agent-authored changes. These rules apply to every task in this repository.
Task-specific runbooks live in.agents/skills/— load the
relevant skill before starting a workflow it covers.Project overview
AI-Q is an NVIDIA AI Blueprint: an enterprise research agent built on the
NeMo Agent Toolkit (NAT). The deployed product is a research blueprint, not
a general skill runtime. New retrieval sources and tools are NAT functions;
agent behavior is driven by workflow YAML, Jinja2 prompts, and a data-source
registry — not by hard-coded logic.Primary boundaries:
- Backend Python package:
src/aiq_agent/.- Data-source and tool packages:
sources/(each is its own package).- Frontends and tooling:
frontends/(web UI infrontends/ui/, eval harnesses
infrontends/benchmarks/).- Configs, deployment, docs:
configs/,deploy/,docs/.Stay inside this repository. If your workspace also contains adjacent repos
(for example a sibling NeMo-Relay checkout), do not edit them as part of an AI-Q
change. Treatsources/*as independent packages: prefer the smallest change
scoped to the package you are touching.Repository structure
Path Purpose src/aiq_agent/Backend agent, FastAPI extensions, auth, observability, knowledge sources/Data-source / tool packages (e.g. tavily_web_search,google_scholar_paper_search)configs/Workflow YAML configs (e.g. config_cli_default.yml)frontends/ui/Next.js / React / TypeScript / Tailwind / KUI web UI frontends/benchmarks/Eval harnesses: freshqa,deepsearch_qa,deepresearch_benchdeploy/Docker Compose and Helm/Kubernetes assets; deploy/.envfor secretsdocs/source/...
Files:
sources/you_com/tests/test_you_web_search.pysources/you_com/tests/test_you_contents.pysources/you_com/src/register.py
{src/aiq_agent/knowledge/**,sources/**}
⚙️ CodeRabbit configuration file
{src/aiq_agent/knowledge/**,sources/**}: Review data-source and knowledge-layer changes for optional dependency boundaries, external API error handling,
retry/rate-limit behavior, deterministic tests, and registration consistency. New source packages should include
package metadata, plugin registration when applicable, and source-level tests.
Files:
sources/you_com/tests/test_you_web_search.pysources/you_com/tests/test_you_contents.pysources/you_com/src/register.py
🔇 Additional comments (3)
sources/you_com/src/register.py (1)
67-72: LGTM!Also applies to: 260-265, 300-312
sources/you_com/tests/test_you_web_search.py (1)
210-218: LGTM!sources/you_com/tests/test_you_contents.py (1)
85-89: LGTM!
Signed-off-by: eddyn-you <eddyn@you.com>
Signed-off-by: eddyn-you <eddyn@you.com>
Signed-off-by: eddyn-you <eddyn@you.com>
|
@AjayThorve I have addressed all CodeRabbit comments! Let me know what I need to do to proceed :) Looking forward to the integration! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@sources/you_com/tests/conftest.py`:
- Line 23: Move the you_com.register import and its reg alias to module scope
alongside the existing imports in conftest.py, then remove the local import from
the fixture while preserving the fixture’s state-reset behavior. Run Ruff with
E,F,W,I,PL,UP to verify formatting and lint compliance.
🪄 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: Enterprise
Run ID: e4e75e74-f90b-42bc-8119-9abcfc386825
📒 Files selected for processing (5)
sources/you_com/tests/conftest.pysources/you_com/tests/test_you_contents.pysources/you_com/tests/test_you_finance_research.pysources/you_com/tests/test_you_research.pysources/you_com/tests/test_you_web_search.py
💤 Files with no reviewable changes (3)
- sources/you_com/tests/test_you_finance_research.py
- sources/you_com/tests/test_you_web_search.py
- sources/you_com/tests/test_you_research.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run ruff check and ruff format validation for Python code changes
**/*.py: Python code must be linted and formatted with Ruff using line length 120, target Python 3.11, rule sets E,F,W,I,PL,UP, and isort force-single-line configuration
Never commit secrets, tokens, or environment-specific hostnames; use environment variables and SecretStr instead, resolving API keys at runtime
Never print or log secret values, including in tool output or error messages
Missing-secret paths must degrade gracefully (stub/skip), not crash or leak
Do not hand-reformat unrelated code when making changes; match the existing import and formatting style
Files:
sources/you_com/tests/conftest.pysources/you_com/tests/test_you_contents.py
**/*test*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run pytest for all behavior changes in Python code
Files:
sources/you_com/tests/conftest.pysources/you_com/tests/test_you_contents.py
sources/**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
New tools and data sources must be NAT functions registered with
@register_functiondecorator
Files:
sources/you_com/tests/conftest.pysources/you_com/tests/test_you_contents.py
{src/aiq_agent/knowledge/**,sources/**}
⚙️ CodeRabbit configuration file
{src/aiq_agent/knowledge/**,sources/**}: Review data-source and knowledge-layer changes for optional dependency boundaries, external API error handling,
retry/rate-limit behavior, deterministic tests, and registration consistency. New source packages should include
package metadata, plugin registration when applicable, and source-level tests.
Files:
sources/you_com/tests/conftest.pysources/you_com/tests/test_you_contents.py
🔇 Additional comments (1)
sources/you_com/tests/test_you_contents.py (1)
24-24: LGTM!Also applies to: 67-70
AjayThorve
left a comment
There was a problem hiding this comment.
Requesting changes based on validation of fedade1b6eb49a73df512fd27e643dbba40e2dc1.
The three inline comments are merge blockers. There is also an integration blocker not naturally attachable to an added line: no shipped configs/*.yml references any you_* function or maps it through data_source_registry, so the plugins are discoverable but no shipped AI-Q agent can invoke them. Please add a supported runnable configuration/registry path, or explicitly scope this as a plugin-only contribution and include an executable configuration example.
The PR also currently conflicts with release/2.2 in .secrets.baseline; rebase and regenerate that baseline after resolving the substantive findings.
Positive validation: all 74 package tests passed, the 1,302 core backend tests passed with 8 skips, pre-commit passed, all four API paths succeeded live, and a real NAT tool-calling-agent smoke succeeded. The repository-wide pytest command still fails during collection for the reason in the first inline comment.
We would love to be integrated with one of the existing configs, especially benchmarks including the deep research agent. We have done extensive testing on our side and believe that you.com search is a significant improvement to Tavily search |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@sources/you_com/src/register.py`:
- Around line 217-221: Update the max_content_length Field definition to enforce
a minimum value of zero with Pydantic’s ge constraint, while continuing to allow
zero and None. Add pytest coverage confirming negative values are rejected and
zero and None are accepted.
🪄 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: Enterprise
Run ID: de5e8f3a-f320-41d8-aea4-c31ab7d3e097
📒 Files selected for processing (3)
sources/you_com/README.mdsources/you_com/src/register.pysources/you_com/tests/test_you_web_search.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
{src/aiq_agent/knowledge/**,sources/**}
⚙️ CodeRabbit configuration file
{src/aiq_agent/knowledge/**,sources/**}: Review data-source and knowledge-layer changes for optional dependency boundaries, external API error handling,
retry/rate-limit behavior, deterministic tests, and registration consistency. New source packages should include
package metadata, plugin registration when applicable, and source-level tests.
Files:
sources/you_com/README.mdsources/you_com/tests/test_you_web_search.pysources/you_com/src/register.py
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run ruff check and ruff format validation for Python code changes
**/*.py: Python code must be linted and formatted with Ruff using line length 120, target Python 3.11, rule sets E,F,W,I,PL,UP, and isort force-single-line configuration
Never commit secrets, tokens, or environment-specific hostnames; use environment variables and SecretStr instead, resolving API keys at runtime
Never print or log secret values, including in tool output or error messages
Missing-secret paths must degrade gracefully (stub/skip), not crash or leak
Do not hand-reformat unrelated code when making changes; match the existing import and formatting style
Files:
sources/you_com/tests/test_you_web_search.pysources/you_com/src/register.py
**/*test*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run pytest for all behavior changes in Python code
Files:
sources/you_com/tests/test_you_web_search.py
sources/**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
New tools and data sources must be NAT functions registered with
@register_functiondecorator
Files:
sources/you_com/tests/test_you_web_search.pysources/you_com/src/register.py
🔇 Additional comments (2)
sources/you_com/README.md (1)
1-59: LGTM!sources/you_com/tests/test_you_web_search.py (1)
63-63: LGTM!Also applies to: 127-139
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
sources/you_com/src/register.py (4)
472-479: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winEnforce the documented 10-URL contents limit before calling the API.
_you_contentsdocuments a maximum of 10 URLs but forwards arbitrarily large lists to the remote service. Validate the list locally before entering the retry loop; otherwise invalid requests can be retried repeatedly.🤖 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 `@sources/you_com/src/register.py` around lines 472 - 479, Update _you_contents to validate that urls contains no more than 10 entries before entering its retry loop or making any API request. Reject oversized input immediately using the module’s established validation/error pattern, while preserving the existing behavior for lists within the documented limit.
332-333: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winHonor
max_content_length=0.Because this check uses truthiness, zero disables truncation and returns the full livecrawl content. Since zero is an accepted configured value, use
is not Noneso zero produces empty content, and add pytest coverage for zero andNone.As per coding guidelines, Python behavior changes must be validated with pytest.
Proposed fix
- if tool_config.max_content_length: + if tool_config.max_content_length is not None: content = content[: tool_config.max_content_length]🤖 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 `@sources/you_com/src/register.py` around lines 332 - 333, Update the max-content truncation logic in the livecrawl handling around tool_config.max_content_length to check for is not None, so a configured value of 0 yields empty content while None leaves content unchanged. Add pytest coverage verifying both zero and None behavior.Source: Coding guidelines
290-290: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftAdd the You.com tools to shipped
data_source_registryconfigs. The@register_functiondecorators only make the functions discoverable; the shippedconfigs/*.ymlfiles do not mapyou_web_search,you_research,you_finance_research, oryou_contentsintodata_source_registry, so agents cannot reach them in production. Add the registry entries and an end-to-end invocation test.🤖 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 `@sources/you_com/src/register.py` at line 290, Update the shipped configs/*.yml data_source_registry entries to map you_web_search, you_research, you_finance_research, and you_contents to their registered You.com tools, then add an end-to-end test that invokes each tool through the registry.
149-150: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winTreat non-positive
timeoutexplicitly.YouToolConfig.timeoutaccepts any float, but the retry path skipsasyncio.wait_forwhenever the value is falsy, so0silently disables the timeout. Reject<= 0in config validation, or switch totimeout is not Noneif zero should still be enforced.🤖 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 `@sources/you_com/src/register.py` around lines 149 - 150, Handle non-positive YouToolConfig.timeout values explicitly: either reject values less than or equal to zero during configuration validation, or change the await logic around coro_factory and asyncio.wait_for to test timeout is not None so zero remains enforced. Keep timeout behavior consistent between validation and the retry execution path.
🤖 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.
Outside diff comments:
In `@sources/you_com/src/register.py`:
- Around line 472-479: Update _you_contents to validate that urls contains no
more than 10 entries before entering its retry loop or making any API request.
Reject oversized input immediately using the module’s established
validation/error pattern, while preserving the existing behavior for lists
within the documented limit.
- Around line 332-333: Update the max-content truncation logic in the livecrawl
handling around tool_config.max_content_length to check for is not None, so a
configured value of 0 yields empty content while None leaves content unchanged.
Add pytest coverage verifying both zero and None behavior.
- Line 290: Update the shipped configs/*.yml data_source_registry entries to map
you_web_search, you_research, you_finance_research, and you_contents to their
registered You.com tools, then add an end-to-end test that invokes each tool
through the registry.
- Around line 149-150: Handle non-positive YouToolConfig.timeout values
explicitly: either reject values less than or equal to zero during configuration
validation, or change the await logic around coro_factory and asyncio.wait_for
to test timeout is not None so zero remains enforced. Keep timeout behavior
consistent between validation and the retry execution path.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: ba4bbd57-a21d-4893-8a12-f9156019c2ce
📒 Files selected for processing (2)
sources/you_com/src/register.pysources/you_com/tests/test_you_helpers.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run ruff check and ruff format validation for Python code changes
**/*.py: Python code must be linted and formatted with Ruff using line length 120, target Python 3.11, rule sets E,F,W,I,PL,UP, and isort force-single-line configuration
Never commit secrets, tokens, or environment-specific hostnames; use environment variables and SecretStr instead, resolving API keys at runtime
Never print or log secret values, including in tool output or error messages
Missing-secret paths must degrade gracefully (stub/skip), not crash or leak
Do not hand-reformat unrelated code when making changes; match the existing import and formatting style
Files:
sources/you_com/tests/test_you_helpers.pysources/you_com/src/register.py
**/*test*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run pytest for all behavior changes in Python code
Files:
sources/you_com/tests/test_you_helpers.py
sources/**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
New tools and data sources must be NAT functions registered with
@register_functiondecorator
Files:
sources/you_com/tests/test_you_helpers.pysources/you_com/src/register.py
{src/aiq_agent/knowledge/**,sources/**}
⚙️ CodeRabbit configuration file
{src/aiq_agent/knowledge/**,sources/**}: Review data-source and knowledge-layer changes for optional dependency boundaries, external API error handling,
retry/rate-limit behavior, deterministic tests, and registration consistency. New source packages should include
package metadata, plugin registration when applicable, and source-level tests.
Files:
sources/you_com/tests/test_you_helpers.pysources/you_com/src/register.py
🔇 Additional comments (2)
sources/you_com/src/register.py (1)
163-163: LGTM!sources/you_com/tests/test_you_helpers.py (1)
170-176: LGTM!
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pyproject.toml (1)
210-210: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftWire
you-cominto shipped configs and registry.
you-comis installed, but no shipped config references anyyou_*tool or maps it throughdata_source_registry, so default agents and benchmarks still can’t invoke it. Add the registry wiring and a shipped-agent smoke test.🤖 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 `@pyproject.toml` at line 210, Wire the installed "you-com" dependency into the shipped configuration by adding the appropriate you_* tool reference and mapping it through data_source_registry. Update a shipped agent configuration to invoke the tool and add a smoke test confirming the agent can access it, preserving existing configuration conventions.
🤖 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.
Outside diff comments:
In `@pyproject.toml`:
- Line 210: Wire the installed "you-com" dependency into the shipped
configuration by adding the appropriate you_* tool reference and mapping it
through data_source_registry. Update a shipped agent configuration to invoke the
tool and add a smoke test confirming the agent can access it, preserving
existing configuration conventions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: a0b79518-7b58-4eca-a838-51f9fbe7eca8
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
.secrets.baselinedeploy/.env.examplepyproject.toml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
{.github/**,ci/**,.pre-commit-config.yaml,pyproject.toml,uv.lock}
⚙️ CodeRabbit configuration file
{.github/**,ci/**,.pre-commit-config.yaml,pyproject.toml,uv.lock}: Review automation and packaging changes for least-privilege permissions, pinned versions where appropriate,
copy-pr-bot pull-request/ branch behavior, reproducible uv/npm setup, secret handling, and consistency with
the documented validation matrix.
Files:
pyproject.toml
🔇 Additional comments (3)
.secrets.baseline (1)
136-136: LGTM!Also applies to: 145-145, 172-172, 309-309, 358-358
deploy/.env.example (1)
21-21: LGTM!Also applies to: 174-183
pyproject.toml (1)
85-89: LGTM!
Signed-off-by: eddyn-you <eddyn@you.com>
Signed-off-by: eddyn-you <eddyn@you.com>
Signed-off-by: eddyn-you <eddyn@you.com>
Signed-off-by: eddyn-you <eddyn@you.com>
Signed-off-by: eddyn-you <eddyn@you.com>
Signed-off-by: eddyn-you <eddyn@you.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
sources/you_com/src/register.py (2)
375-376: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftWire the registered tools into a shipped agent configuration.
@register_functionexposes these functions to the NAT registry, but does not add them todata_source_registryor an enabled AI-Q agent. The PR objectives state that no shipped configuration references the newyou_*functions, leaving the package installed but unreachable by shipped agents. Add the mappings to an existing benchmark/deep-research configuration and cover invocation.As per path instructions, data-source changes must be reviewed for “registration consistency.”
Also applies to: 416-417, 456-457
🤖 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 `@sources/you_com/src/register.py` around lines 375 - 376, Wire the registered you_* functions, including you_finance_research and the functions at the referenced locations, into data_source_registry and an existing shipped benchmark/deep-research AI-Q configuration. Ensure the configuration enables those mappings so installed agents can reach them, and add coverage that invokes each newly registered tool through the shipped configuration.Source: Path instructions
473-480: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winEnforce the documented 10-URL cap locally.
_you_contentsforwardsurlsstraight tocontents_async, so oversized batches still hit the API and consume retries; reject lists with more than 10 items before dispatching.🤖 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 `@sources/you_com/src/register.py` around lines 473 - 480, Update _you_contents to validate the length of urls before calling contents_async, rejecting batches containing more than 10 URLs while preserving normal dispatch for lists of 10 or fewer.Source: Path instructions
🤖 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.
Outside diff comments:
In `@sources/you_com/src/register.py`:
- Around line 375-376: Wire the registered you_* functions, including
you_finance_research and the functions at the referenced locations, into
data_source_registry and an existing shipped benchmark/deep-research AI-Q
configuration. Ensure the configuration enables those mappings so installed
agents can reach them, and add coverage that invokes each newly registered tool
through the shipped configuration.
- Around line 473-480: Update _you_contents to validate the length of urls
before calling contents_async, rejecting batches containing more than 10 URLs
while preserving normal dispatch for lists of 10 or fewer.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 916b7bb7-9e16-4ea1-8563-6be5111848e4
📒 Files selected for processing (1)
sources/you_com/src/register.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run ruff check and ruff format validation for Python code changes
**/*.py: Python code must be linted and formatted with Ruff using line length 120, target Python 3.11, rule sets E,F,W,I,PL,UP, and isort force-single-line configuration
Never commit secrets, tokens, or environment-specific hostnames; use environment variables and SecretStr instead, resolving API keys at runtime
Never print or log secret values, including in tool output or error messages
Missing-secret paths must degrade gracefully (stub/skip), not crash or leak
Do not hand-reformat unrelated code when making changes; match the existing import and formatting style
Files:
sources/you_com/src/register.py
sources/**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
New tools and data sources must be NAT functions registered with
@register_functiondecorator
Files:
sources/you_com/src/register.py
{src/aiq_agent/knowledge/**,sources/**}
⚙️ CodeRabbit configuration file
{src/aiq_agent/knowledge/**,sources/**}: Review data-source and knowledge-layer changes for optional dependency boundaries, external API error handling,
retry/rate-limit behavior, deterministic tests, and registration consistency. New source packages should include
package metadata, plugin registration when applicable, and source-level tests.
Files:
sources/you_com/src/register.py
🔇 Additional comments (3)
sources/you_com/src/register.py (3)
493-494: Keep empty-contents failures classified as errors.This repeats the existing review finding: if
_run_with_retriesreturns bareValueErrormessages unchanged,"Contents API returned no results."lacks theError:classification and may be registered as a citable source. Verify the shared helper still normalizes this path before merging.
194-229: LGTM!
384-413: LGTM!Also applies to: 425-451
|
/ok to test 0f75c99 |
|
/ok to test 379d98e |
|
/merge |
de700f2
into
NVIDIA-AI-Blueprints:release/2.2
#### Overview Fix the AI-Q 2.2 documentation publication contract and refresh release-facing documentation against the current `release/2.2` branch. The version selector had three independent sources of drift: - `conf.py` still rendered `version_match = 1.2.1` after the site was deployed under `2.2.0-rc1`. - `project.json` and the Sphinx release value had to be updated separately. - `../versions1.json` resolved to the publisher-managed root index on top-level pages but to the copied per-version file on nested pages. That copied file contained only one version and used the invalid `ai-blueprint` site slug. This change makes `docs/source/project.json` the single version authority, sets it to the exact `v2.2.0-rc1` artifact version, points every page at the canonical publisher-managed selector index, and removes the duplicated per-build `versions1.json`. The release-facing README, changelog, FAQ, troubleshooting, and navigation now cover Azure AI Search, You.com, Nimble, the standalone public MCP server, the workflow-configuration maintainer skill, and all eleven checked-in workflow profiles. The Nimble links use its canonical documentation, with narrowly scoped exclusions in both link checkers because Nimble's certificate chain is not accepted by Python/OpenSSL or the Node link checker. Developer impact: advancing the docs version now requires one edit to `project.json`; Sphinx and the NVIDIA Docs publisher consume the same value. #### DCO sign-off for the squash commit Signed-off-by: Ajay Thorve <AjayThorve@users.noreply.github.com> #### Validation ```text $ uv run ruff check docs/source/conf.py All checks passed! $ uv run ruff format --check docs/source/conf.py 1 file already formatted $ uv run --extra docs sphinx-build -M html docs/source docs/build -W --keep-going -n build succeeded. $ uv run --extra docs sphinx-build -M linkcheck docs/source docs/build -W --keep-going -n build succeeded. $ uv run python <metadata, config-inventory, and generated-HTML assertions> docs metadata, config inventory, and generated switcher contract: PASS $ uv run pre-commit run --files <complete PR diff> All applicable hooks passed, including Ruff, detect-secrets, and Markdown Link Check. ``` The live publisher index at `https://docs.nvidia.com/aiq-blueprint/versions1.json` currently reports `2.2.0-rc1`, `2.1.0`, `2.0.0`, and `1.2.1`. Generated top-level and nested pages both use that canonical index and match `2.2.0-rc1`. - [x] I ran the relevant local checks or explained why they are not applicable. - [x] I added or updated validation for behavior changes. - [x] I updated documentation for user-facing or contributor-facing changes. - [x] I confirmed this PR does not include secrets, credentials, or internal-only data. - [x] I certify this contribution under the Developer Certificate of Origin (DCO) and signed my commits with `git commit -s` or an equivalent sign-off. - [x] I replaced the DCO sign-off placeholder with my GitHub commit identity and kept the required angle brackets around the email address. #### Where should reviewers start? Start with `docs/source/conf.py`, `docs/source/project.json`, and the removal of `docs/source/versions1.json`; together they define the publication and selector invariant. Then review the config inventory in `README.md` and `docs/source/customization/configuration-reference.md`, followed by `docs/source/customization/you-com.md` and the Nimble link-check handling. #### Related Issues - Relates to #261, #308, #316, #319, and #334. ## Summary by CodeRabbit * **New Features** * Added documentation for You.com tools, configurable Nimble web search modes, Azure AI Search knowledge retrieval (API key and managed identity), and standalone MCP server setup. * Updated setup guidance with new Nimble/You.com data-source options. * **Documentation** * Expanded sources/integrations, authentication, and workflow configuration details. * Improved docs release metadata and versioning/switcher behavior; added additional configuration profiles and references. * Refreshed troubleshooting and FAQ entries for You.com and Azure AI Search. * **Chores** * Refreshed the secrets baseline metadata. * Improved markdown link-check ignore rules for specific Nimble URLs. Authors: - Ajay Thorve (https://github.com/AjayThorve) Approvers: - Eddy (https://github.com/eddy-nassif) - Kyle Zheng (https://github.com/KyleZheng1284) URL: #345
Overview
We would like to add the You.com API suite to this framework so that agents can use You.com APIs. In this PR I have added You.com Web Search, Contents, Research and Finance Research APIs, allowing users to search the web, grab web page contents, and execute long running tasks to answer complex questions.
For each tool added I have added a section in the README and have written tests to confirm things are working as expected.
Validation
git commit -sor an equivalent sign-off.Where should reviewers start?
register.py
Related Issues
Summary by CodeRabbit
YDC_API_KEYconfiguration with consistent “unavailable” messaging when not set.YDC_API_KEY.Signed-off-by: Ajay Thorve athorve@users.noreply.github.com