Skip to content

feat(coding-agent): add Keenable web search provider and fetch reader - #9939

Open
audreyt wants to merge 24 commits into
can1357:mainfrom
audreyt:feat/keenable-search
Open

audreyt wants to merge 24 commits into
can1357:mainfrom
audreyt:feat/keenable-search

Conversation

@audreyt

@audreyt audreyt commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

What

Adds Keenable as a first-class web_search provider and providers.fetch reader.

  • Search: POST https://api.keenable.ai/v1/search with X-API-Key
  • Fetch: GET https://api.keenable.ai/v1/fetch
  • Auth: KEENABLE_API_KEY or /login keenable
  • Explicit provider=keenable / providers.fetch=keenable can use the public keyless endpoints (X-Keenable-Title)
  • Auto chain requires a key, so Keenable does not consume the shared per-IP public pool and does not preempt SearXNG or other configured providers

19 files, +713 −17.

Why

Keenable is an independent search/fetch API for agents. A previous attempt (#2675) used the MCP transport and was closed in the two-week PR cleanup with an invitation to open a fresh PR against current main. This implementation uses the documented REST API instead of a per-search MCP handshake.

Not a duplicate of any open PR (searched keenable on can1357/oh-my-pi; no matching code on main).

Testing

  • bun run check:ts — pass (all workspace packages, including coding-agent)
  • biome on the 19-file diff — clean
  • bun test in coding-agent: web-search-keenable, fetch-keenable, cli-provider-settings, eval-code-mode-declarations — 21 pass
  • bun test in ai: provider-registry — 7 pass
  • Live: omp search --provider=keenableProvider: Keenable (API); omp read https://example.com with providers.fetch=keenableMethod: keenable

  • bun check passes
  • Tested locally
  • CHANGELOG updated (if user-facing)

@roboomp roboomp added auth Authentication and login flows feat provider:keenable providers LLM provider-specific issues review:p2 tool Tool behavior and integrations triaged labels Aug 27, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b41f42b555

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/web/search/provider.ts Outdated
@audreyt
audreyt force-pushed the feat/keenable-search branch from b41f42b to 8c0a62b Compare August 27, 2026 11:11

@roboomp roboomp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P2 — coherent provider feature, but adding keyed Keenable to the default search and fetch fallback chains needs explicit maintainer intent.
Blocking: fetchKeenablePage() violates its documented null-on-parse-failure contract. Should-fix: availability safety branches lack coverage, the registry adds a prohibited inline import, and both new test suites leak KEENABLE_API_KEY.
Validation: bun run check:ts passed; 16 focused Keenable/registry tests passed; public search and fetch endpoints returned 200 in live smoke checks. The CLI settings test could not load the checkout's missing tool-views.generated.js artifact.
Thanks for the focused implementation and complete user-facing documentation.

Comment thread packages/coding-agent/src/web/keenable.ts Outdated
Comment thread packages/coding-agent/src/web/search/providers/keenable.ts
Comment thread packages/coding-agent/src/web/search/provider.ts Outdated
Comment thread packages/coding-agent/test/tools/web-search-keenable.test.ts Outdated
Comment thread packages/coding-agent/test/tools/fetch-keenable.test.ts Outdated
@audreyt
audreyt force-pushed the feat/keenable-search branch from 8c0a62b to 4432a1c Compare August 27, 2026 11:51

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4432a1cb8f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/web/search/providers/keenable.ts Outdated
@audreyt
audreyt force-pushed the feat/keenable-search branch from 4432a1c to eb26cf5 Compare August 27, 2026 12:09
Copilot AI lite review requested due to automatic review settings September 3, 2026 09:49
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Copilot AI 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.

🟡 Changes recommended

It introduces an eager Keenable provider import that breaks the documented lazy-loading contract and a Keenable fetch path that should pass an output-size hint to avoid unbounded payloads.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds Keenable as a first-class web_search provider and as a providers.fetch reader backend in packages/coding-agent, wiring it into settings, auth/login, docs, and tests.

Changes:

  • Implement Keenable web search provider with API-key auth and explicit-only keyless /public fallback.
  • Add Keenable-backed fetch reader backend and expose it via providers.fetch.
  • Register Keenable auth/login support in catalog rules and update documentation/changelogs/tests accordingly.
File summaries
File Description
README.md Updates headline counts and provider table to include Keenable.
packages/coding-agent/test/web/search/cli-provider-settings.test.ts Adds KEENABLE_API_KEY to env-key coverage.
packages/coding-agent/test/tools/web-search-keenable.test.ts New unit tests for Keenable search mapping, directives, fallback behavior, and availability gating.
packages/coding-agent/test/tools/fetch-keenable.test.ts New unit tests for Keenable fetch reader behavior (keyed/public/auto-skip).
packages/coding-agent/src/web/search/types.ts Adds Keenable to the provider options/labels/order derivation.
packages/coding-agent/src/web/search/providers/keenable.ts New Keenable provider implementation (REST search + formatting/mapping).
packages/coding-agent/src/web/search/provider.ts Registers Keenable provider in the lazy provider registry (but currently with an eager import).
packages/coding-agent/src/web/keenable.ts New shared Keenable REST helpers (URLs, auth headers, fetch helper).
packages/coding-agent/src/tools/fetch.ts Adds Keenable to the reader backend chain for renderHtmlToText.
packages/coding-agent/src/config/settings-schema.ts Adds keenable to providers.fetch enum + UI metadata.
packages/coding-agent/src/cli/help-extra.ts Documents KEENABLE_API_KEY in CLI help.
packages/coding-agent/CHANGELOG.md Changelog entry for Keenable search + fetch support.
packages/catalog/src/compat/rules/auth/keenable.kdl Adds /login keenable + env var mapping.
packages/catalog/src/compat/rules/auth/_order.kdl Inserts Keenable into login order.
packages/catalog/src/compat/rules.json Updates generated compat rules to include Keenable auth.
packages/catalog/src/compat/auth-ids.ts Adds keenable to AuthProviderId/LoginProviderId unions.
packages/ai/test/provider-registry.test.ts Ensures Keenable appears in the registry auth surface.
packages/ai/CHANGELOG.md Notes Keenable login availability.
docs/tools/web_search.md Documents Keenable behavior and updates provider counts/ordering.
docs/settings.md Updates settings docs for new provider IDs and providers.fetch enum value.
docs/environment-variables.md Documents KEENABLE_API_KEY.
Review details

Suppressed comments (1)

packages/coding-agent/src/web/search/provider.ts:87

  • PROVIDER_META is meant to lazy-load provider modules via dynamic import, but keenable currently constructs KeenableProvider directly (and is paired with an eager import above). Use the same dynamic-import pattern as the other entries so Keenable’s implementation is only loaded when selected.
	keenable: {
		id: "keenable",
		label: SEARCH_PROVIDER_LABELS.keenable,
		load: async () => new KeenableProvider(),
	},
  • Files reviewed: 21/21 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/coding-agent/src/tools/fetch.ts
Comment thread packages/coding-agent/src/web/search/provider.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

2 similar comments
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a7db23dc6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/ai/CHANGELOG.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f10aa102bf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/coding-agent/src/web/search/providers/keenable.ts Outdated
audreyt added a commit to audreyt/oh-my-pi that referenced this pull request Sep 5, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-16T13:20:40.906580Z bc2ba37 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

audreyt added a commit to audreyt/oh-my-pi that referenced this pull request Sep 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9cdc371877

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/web/search/providers/keenable.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: beab4bbc5b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/web/search/providers/keenable.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8760996c8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/web/search/providers/keenable.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4fd98f3833

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/web/search/providers/keenable.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42add9fbe0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/web/keenable.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bc2ba377f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/web/search/providers/keenable.ts Outdated
REST search and page fetch via KEENABLE_API_KEY or /login keenable. Explicit selection can use the public keyless API; the auto chain requires a key so it does not consume the shared per-IP pool.
Drop the local record guard; the shared helper is the single
implementation for this check.
…ased sections

Collapse the three scattered Keenable login bullets into one Unreleased entry per package and drop merge-artifact additions to released sections.
Collapse tabs/newlines in result titles with the shared normalizeSearchText helper so one scraped title cannot disrupt the framed source-tree layout; blank titles fall back to the URL.
Route published_at through the shared normalizeSearchText helper so a malformed date with tabs/newlines cannot corrupt the framed source-row metadata. Relative-age strings pass through intact for the query-layer fallback.
Run snippet and description candidates through normalizeSearchText so embedded tabs/newlines from scraped metadata cannot split the rendered Markdown or tool result.
Reject hits with tab/newline-bearing, over-long, or non-HTTP(S) URLs instead of storing them verbatim; serialize the rest via WHATWG URL. Title fallback uses the normalized URL. Also import SearchResponse/SearchSource from @oh-my-pi/pi-tui after the upstream move.
@audreyt
audreyt force-pushed the feat/keenable-search branch from bc2ba37 to efefe95 Compare September 18, 2026 10:44
# Conflicts:
#	docs/settings.md
#	packages/catalog/src/compat/rules.json
#	packages/coding-agent/src/web/search/provider.ts
#	packages/coding-agent/test/web/search/cli-provider-settings.test.ts
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

# Conflicts:
#	packages/catalog/src/compat/rules.json
#	packages/catalog/src/compat/rules/auth/_order.kdl
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

# Conflicts:
#	packages/catalog/src/compat/rules.json
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

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

Labels

auth Authentication and login flows feat provider:keenable providers LLM provider-specific issues review:p2 tool Tool behavior and integrations triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants