Skip to content

docs(gap-baseline): record SDK-parity (33-37) scoping, reclassify item 32 - #1746

Open
seonghobae wants to merge 3 commits into
mainfrom
docs/gap-baseline-sdk-parity-scoping
Open

docs(gap-baseline): record SDK-parity (33-37) scoping, reclassify item 32#1746
seonghobae wants to merge 3 commits into
mainfrom
docs/gap-baseline-sdk-parity-scoping

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Records the SDK-parity (backlog items 33-37) scoping pass and item 32 reclassification discussed with a peer session. Documentation only — no code changes, per this session's throttle agreement given the ongoing GitHub Actions capacity crunch (re-verified at commit time: 2154 queued / 2-4 in-progress, unimproved).

What's recorded

  • An evidence-based gap list for contextual-orchestrator vs. the OpenAI SDK, built by reading server.py/batch_routing.py/file_registry.py directly rather than guessing.
  • Already-implemented endpoints (broader than expected: chat/completions, responses, embeddings, files, batch/embeddings, videos, images/generations, audio family).
  • Genuinely missing endpoints (moderations, fine_tuning/jobs, audio/translations, images/edits+variations, uploads, realtime).
  • Item 32 (batch scope) reclassified from "not started" to "needs re-verification" — batch_routing.py already has non-trivial routing policy logic.
  • Item 36 (S3-backed Files) confirmed as a real gap.
  • A suggested implementation order, explicitly deferred pending queue relief or explicit owner direction.

Test plan

  • Docs-only change, no code/workflow/test files touched

🤖 Generated with Claude Code


Devin Review

…m 32

Read contextual-orchestrator's server.py (8744 lines), batch_routing.py,
and file_registry.py directly from protected main to build an evidence-
based gap list against the OpenAI SDK, rather than guessing scope.

Already implemented (broader than expected): chat/completions,
responses, completions (legacy), embeddings, models, files,
batch/embeddings, videos, images/generations, audio/{speech,
transcriptions,generations}, plus a non-standard rerank extension.

Genuinely missing: moderations, fine_tuning/jobs, audio/translations,
images/{edits,variations}, uploads, realtime (WebSocket -- flagged as
needing its own ADR before implementation, given the architectural
shift to a persistent connection). Assistants API family (assistants/
threads/runs/vector_stores) noted as missing but likely low priority,
since OpenAI itself is sunsetting it in favor of the already-implemented
Responses API.

Item 32 (batch scope) reclassified: batch_routing.py already has a
per-request RoutingPolicy dispatching to pg-llm-batch, so this needs
re-verification against the item's actual concern, not new
implementation from a blank slate.

Item 36 (S3-backed Files) confirmed as a real gap: current file_registry.py
is a provider-affinity proxy, not a self-hosted object-storage-backed
implementation.

Implementation deliberately deferred per this session's throttle
agreement: the GitHub Actions capacity crunch this document already
records (60-slot ceiling) was re-checked before this entry and is
unimproved (2154 queued / 2-4 in-progress) -- opening new feature PRs
now would add to it rather than help clear it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 5469418a-ba0c-4165-b0d4-b4d8dcf423ad

📥 Commits

Reviewing files that changed from the base of the PR and between 269e5bd and 7fbbbc1.

📒 Files selected for processing (1)
  • docs/product-technical-gap-baseline.md

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.

@devin-ai-integration devin-ai-integration 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.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 4 potential issues.

Devin Review

Comment thread docs/product-technical-gap-baseline.md Outdated
Comment thread docs/product-technical-gap-baseline.md Outdated
Comment thread docs/product-technical-gap-baseline.md Outdated

**Item 32 (batch endpoint scope) reclassified: not a blank-slate gap, needs re-verification instead.** `batch_routing.py` already implements a `RoutingPolicy` that decides sync-vs-batch **per request**, driven by request hints and KV-configured thresholds, dispatching batch-eligible requests to `pg-llm-batch` through an injected OpenAI-compatible `BatchAPIClient`. This may already satisfy item 32's concern ("should the batch endpoint only serve batch models") as a policy decision rather than a hard endpoint restriction — confirming that needs a closer read of `RoutingPolicy`'s actual thresholds and call sites, not new implementation. Left open for whoever picks this up next.

**Item 36 (S3-backed Files API) confirmed as a real gap.** `file_registry.py`'s current `FileOwner`/file-registry logic is a *provider-affinity* registry — it tracks which upstream provider a given gateway file id was proxied to, not a self-hosted store. No S3 (or other object-storage) integration exists. Item 36's "Files API can be self-implemented via S3" is not yet built.

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.

📝 Info: Files gap matches current behavior

The Files API proxies uploads upstream and persists only ownership metadata. No object payload store or S3 integration exists in the inspected implementation.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

…fix xref

Addresses three Devin review findings:

- "Batch scope gap is misclassified": the entry claimed RoutingPolicy already
  gates the batch endpoint to batch-capable models and that eligible requests
  dispatch to pg-llm-batch through an injected BatchAPIClient. Re-read
  server.py/cost_router.py directly: /api/v1/batch_routing_jobs calls
  coordinator.submit_batch() directly, which never consults RoutingPolicy;
  and CostRoutingCoordinator defaults batch_backend to LocalBatchBackend
  unless a caller injects one, which server.py's one constructor call does
  not do (PgLlmBatchBackend is never instantiated outside tests/). Corrected
  the entry to keep item 32 open pending real verification, with exact
  file:line evidence for the corrected claim.
- "External evidence lacks a revision pin": pinned the server.py citation to
  the exact commit inspected.
- "Cross-repository reference is not linkable": `keyverse#103` -> the
  binding-convention form `ContextualWisdomLab/keyverse#103`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BV96rXhqoR3tYZ9AeAVur4

Copy link
Copy Markdown
Contributor Author

Addressed three Devin review findings:

  • "Batch scope gap is misclassified" (the substantive one) — the entry claimed RoutingPolicy already gates /api/v1/batch_routing_jobs to batch-capable models and that eligible requests dispatch to pg-llm-batch through an injected BatchAPIClient. Re-read server.py/cost_router.py directly at contextual-orchestrator@212ff437d: the endpoint calls coordinator.submit_batch() directly (server.py:7453), which never consults self.policy/RoutingPolicy; and CostRoutingCoordinator.__init__ defaults batch_backend to LocalBatchBackend unless a caller injects one (cost_router.py:117-127), which server.py's one constructor call (:5487) does not do — PgLlmBatchBackend is never instantiated anywhere outside tests/. Corrected the entry: item 32 stays open pending real verification of the endpoint's actual model-resolution and backend wiring, with exact file:line evidence for the corrected claim.
  • "External evidence lacks a revision pin" — pinned the server.py citation to the commit actually inspected.
  • "Cross-repository reference is not linkable"keyverse#103ContextualWisdomLab/keyverse#103.

The "Files gap matches current behavior" comment was an info-only confirmation, no change needed.


Generated by Claude Code

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 new potential issue.

Devin Review


**Missing but likely low priority:** `/v1/assistants`, `/v1/threads`, `/v1/runs`, `/v1/vector_stores` (the Assistants API). OpenAI itself is sunsetting this family in favor of the Responses API, which this gateway already implements (`/v1/responses`). Building parity for a family the SDK's own vendor is deprecating is in tension with item 34's "if the SDK has it, implement it" principle — recorded as a judgment call to deprioritize, not a decision to never build it.

**Item 32 (batch endpoint scope) reclassified — corrected per Devin review, item stays open, not "policy already covers it."** `batch_routing.py` does implement a `RoutingPolicy` (`cost_router.py:106`, `self.policy = routing_policy or RoutingPolicy(...)`) that `CostRoutingCoordinator` uses to decide sync-vs-batch for *ordinary* `/v1/chat/completions`-shaped calls. But re-reading `server.py` and `cost_router.py` directly (at `main` commit `212ff437dc297613289dba2e6064ade9942e07d8`) shows this does **not** substantiate the original claim: the explicit `/api/v1/batch_routing_jobs` endpoint (`server.py:7443`) calls `coordinator.submit_batch(...)` (`:7453`) directly — `submit_batch` (`cost_router.py:970`) resolves the request's target model via `_resolve_batch_request` (only for ZDR-tagged requests) and hands off to `self.batch_backend.submit(...)`; neither path consults `self.policy`/`RoutingPolicy` at all, so nothing restricts this endpoint to batch-capable models. Separately, `CostRoutingCoordinator.__init__` (`cost_router.py:117-127`) defaults `self.batch_backend` to `LocalBatchBackend` unless a caller explicitly injects one, and `server.py`'s only constructor call (`server.py:5487`, `CostRoutingCoordinator(orchestrator)`) does not inject one — `PgLlmBatchBackend` (the class that wraps `pg_llm_batch.BatchAPIClient`) is never instantiated anywhere outside `tests/`. So "dispatching batch-eligible requests to pg-llm-batch through an injected BatchAPIClient" does not describe the server's actual default wiring. Item 32 remains open pending real verification of `/api/v1/batch_routing_jobs`'s actual model-resolution and backend wiring — not resolved by `RoutingPolicy`'s existence for a different code path.

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.

📝 Info: Batch classification matches pinned source

At the pinned revision, submit_batch bypasses RoutingPolicy; both production constructors leave batch_backend unset. Only tests instantiate PgLlmBatchBackend, supporting the open-gap classification.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@seonghobae seonghobae moved this to In Progress in naruon Platform Roadmap Sep 3, 2026
@seonghobae seonghobae added documentation Improvements or additions to documentation priority: medium Normal-priority or P2 work type: docs Documentation, ADR, PRD, or technical writing labels Sep 7, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation priority: medium Normal-priority or P2 work type: docs Documentation, ADR, PRD, or technical writing

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants