Skip to content

refactor!: default rerank deps and pass request options as a literal - #10

Merged
TheGreatAxios merged 2 commits into
cl-9147-reranking-replace-copied-transport-and-modelrequesterrorfrom
cl-9155-reranking-replace-spread-built-request-options-with-explicit
Sep 27, 2026
Merged

TheGreatAxios merged 2 commits into
cl-9147-reranking-replace-copied-transport-and-modelrequesterrorfrom
cl-9155-reranking-replace-spread-built-request-options-with-explicit

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Stacked on refactor!: replace ModelRequestError with RerankRequestError #9.
  • rerankDocuments(query, docs, config) works without options. deps (global fetch + createDefaultScheduler()), registry, retry policy, a 30 s per-attempt timeout and the Retry-After extractor are resolved once in rerankDocuments.
  • Request options are one explicit literal; no conditional spreads in src/rerank.ts.
  • The rerankAdapters record is no longer exported; createRerankAdapterRegistry and rerankAdapterRegistry remain.
  • RerankConfig.baseUrl doc uses TEI's port 8080.

Verification

  • bun install --frozen-lockfile, bunx tsc --noEmit, bun test ./src, bunx prettier --check ., bun run build pass.

Closes CL-9155
Closes CL-9142
Closes CL-9150

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Self-review: diff checked against ticket outcomes; independent critique pass run, findings on README wording, registry example and CONTRIBUTING commands fixed. Typecheck, tests, prettier and build pass.

@TheGreatAxios
TheGreatAxios force-pushed the cl-9155-reranking-replace-spread-built-request-options-with-explicit branch from 6db1faf to 88fa537 Compare September 25, 2026 14:16
@TheGreatAxios
TheGreatAxios force-pushed the cl-9155-reranking-replace-spread-built-request-options-with-explicit branch from 88fa537 to 8932606 Compare September 25, 2026 17:31
@TheGreatAxios TheGreatAxios changed the title Default rerank deps, drop conditional spreads, trim adapter exports Resolve rerank defaults once and drop conditional spreads Sep 25, 2026
@TheGreatAxios
TheGreatAxios force-pushed the cl-9155-reranking-replace-spread-built-request-options-with-explicit branch from 8932606 to ca4392c Compare September 26, 2026 01:30
rerankDocuments takes options as optional, defaulting deps to global
fetch and createDefaultScheduler(). Request options are passed as one
explicit literal instead of conditional spreads. The rerankAdapters
record is no longer exported; createRerankAdapterRegistry and
rerankAdapterRegistry remain.
@TheGreatAxios
TheGreatAxios force-pushed the cl-9155-reranking-replace-spread-built-request-options-with-explicit branch from ca4392c to 6840b90 Compare September 26, 2026 01:30
@TheGreatAxios TheGreatAxios changed the title Resolve rerank defaults once and drop conditional spreads refactor!: default rerank deps and pass request options as a literal Sep 26, 2026
@TheGreatAxios
TheGreatAxios added this pull request to stack #15 September 26, 2026 01:59
@TheGreatAxios
TheGreatAxios merged commit 17c3f48 into main Sep 27, 2026
1 check passed
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.

1 participant