Skip to content

feat: support You.com Eco Search as a search provider - #253

Merged
hallerite merged 9 commits into
mainfrom
feat/search-provider
Nov 23, 2026
Merged

hallerite merged 9 commits into
mainfrom
feat/search-provider

Conversation

@snimu

@snimu snimu commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

What

An optional runtime-contract field search_provider selects the backend of the built-in search skill:

  • "serper" (default): unchanged behavior.
  • "eco": You.com Eco Search (GET https://ydc-index.io/v1/eco_search?query=..., X-API-Key header).

search_api_key is the key of the chosen provider. Clients that omit search_provider get Serper.

How

  • rlm.skills.search.run_with_api_key takes provider and picks the provider in one match: _serper_results or _eco_results, each returning results with Serper's title/link/snippet fields. Eco's results.web[] items (title, url, description) are mapped onto them, so both providers share the network_block filtering, the num_results limit and the formatted output. Eco returns at most 10 results and has no count parameter.
  • _RuntimeMetadata and RuntimeConfig have search_provider: Literal["serper", "eco"] = "serper"; the supervisor passes it to the search handler.
  • Model-visible text:
    • The search tool description (shown by help(search)) is provider-neutral: "Run a web search and return formatted title, URL, and snippet results."
    • With eco and no key, the error names YOU_API_KEY.
  • Docs: docs/runtime-contract.md (search_provider row, provider-neutral search_api_key) and docs/tools.md (both providers).

Testing

  • uv run pytest tests/: 403 passed, 1 failed. The failure is test_kernel_recovery.py::test_remote_execution_preserves_state_and_brokers_children, which calls os.sched_getaffinity; that function does not exist on macOS.
  • ruff check and ruff format --check pass.
  • Live: run_with_api_key(..., provider="eco") returns formatted Eco results.

Verifiers: PrimeIntellect-ai/verifiers#3094 adds search_provider to the bash and rlm harnesses and pins this branch until it merges.


Note

Low Risk
Additive config and an alternate HTTP client path; default Serper behavior is unchanged when search_provider is omitted.

Overview
Adds an optional runtime field search_provider ("serper" default, or "eco") so the built-in search skill can call You.com Eco Search instead of Serper. search_api_key is documented and used as the active provider’s key; missing-key errors name YOU_API_KEY for eco and SERPER_API_KEY for serper.

run_with_api_key selects the backend with a match on provider, fetches via _serper_results or _eco_results, and maps Eco’s web fields onto the same title/link/snippet shape so network_block, num_results, and formatting stay shared. RuntimeConfig, ACP _RuntimeMetadata, and the supervisor’s search MCP handler pass search_provider through; tool copy is provider-neutral.

Docs in runtime-contract.md and tools.md describe the new field. Tests cover Eco responses with no web results.

Reviewed by Cursor Bugbot for commit 41e977b. Bugbot is set up for automated code reviews on this repo. Configure here.

Add an optional runtime-contract field `search_provider` ("serper" by
default, or "eco") that selects the backend of the built-in `search`
skill. `search_api_key` stays the key of the chosen provider.

Eco results (`results.web[]`: url, title, description) are mapped onto
Serper's title/link/snippet fields, so the network blocklist, the result
limit and the formatted output are shared by both providers. The tool
description no longer names Serper.
The You.com key variable is YOU_API_KEY; the missing-key error for the
eco provider now names it.
snimu added a commit to PrimeIntellect-ai/verifiers that referenced this pull request Nov 6, 2026
The You.com key variable is YOU_API_KEY. Move the nano-rlm pin to
08b15cc3, the PrimeIntellect-ai/nano-rlm#253 head with the same rename.
@snimu
snimu marked this pull request as ready for review November 6, 2026 16:24
Eco often returns result URLs as https://www.google.com/goto?url=<token>
redirects, so the network blocklist and the model only saw
www.google.com. Each such link is now resolved concurrently with one
GET that does not follow the redirect, reading the 3xx Location header.
This happens before the blocklist filter, formatting and the limit. A
link that cannot be resolved is dropped when a blocklist is set and kept
otherwise.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread src/rlm/skills/search.py Resolved
snimu added 3 commits November 6, 2026 18:14
… them

Fresh Google /goto tokens only become resolvable a while after the
search, so an immediate lookup almost never helps and costs extra
requests to Google. Remove the lookup. When a network blocklist is set,
a result whose URL is a Google redirect link (www.google.com/goto) is
dropped as unverifiable, for both providers; without a blocklist it
passes through unchanged.
One small function per provider; run_with_api_key matches on the provider once instead of branching three times.
Dropping www.google.com/goto results under a network blocklist is
independent of Eco (Serper returns such links too), so it moves to a
separate PR. This PR only adds Eco.
snimu added a commit to PrimeIntellect-ai/verifiers that referenced this pull request Nov 14, 2026
Dropping www.google.com/goto results under a network blocklist is
independent of Eco, so it moves to a separate PR. Re-pin nano-rlm to
d75fc345, the PrimeIntellect-ai/nano-rlm#253 head without the rule.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a834702. Configure here.

Comment thread src/rlm/skills/search.py Resolved
@hallerite
hallerite merged commit 108bc23 into main Nov 23, 2026
18 checks passed
@hallerite
hallerite deleted the feat/search-provider branch November 23, 2026 18:54
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.

2 participants