Skip to content

feat: add OpenRouter System One client support - #31

Merged
senamakel merged 2 commits into
mainfrom
feat/openrouter-systemone
Sep 20, 2026
Merged

senamakel merged 2 commits into
mainfrom
feat/openrouter-systemone

Conversation

@senamakel

@senamakel senamakel commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Overview

Adds typed OpenRouter System One support to the Rust SDK for JEV requests.

Changes

  • Exposes openrouter_system_one for serializable request payloads
  • Regenerates the public route contract with both System One proxy paths
  • Adds wire-level request and response coverage

Testing

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test
  • cargo package --allow-dirty

Notes

Linked backend PR: https://github.com/tinyhumansai/backend/pull/1361

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel senamakel added the enhancement New feature or request label Sep 20, 2026
@tinysweeper

tinysweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper reviewed this change across 6 lane(s) and found 0 active actionable findings. Detailed lane evidence and any incomplete work are listed below.

State: Incomplete
Priority: none
Reviewed head: 24b70167e1d7
Updated: 1789926533 (Unix time)

Review snapshot

Change surface Files Review signal Count
Production 2 Active findings 0
Tests 2 Noted findings 0
Documentation 0 Resolved findings 8
Configuration 1 Pending checks/questions 2

Completeness: Incomplete
Test assessment: Test coverage is assessed from changed tests and lane evidence; execution is not claimed without trusted check data.

What changed

The pull request adds a System One endpoint for OpenRouter, registers two public routes (primary and TypeSafe-compatible alias), increments path/operation counts in the OpenAPI manifest, and provides a client method and a matching integration test. The review found no critique, security, or test findings.

Features

  • Added — OpenRouter System One passthrough endpoint: Enables typed decision queries against a Jev System One model using the TypeSafe wire shape, and exposes a companion `/v1/systemone` alias for compatibility with `tinyjevclient`. (src/api/agent_integrations/openrouter.rs#impl AgentIntegrationsApi<'_> {, src/generated_public_routes.rs#pub const PUBLIC_ROUTES: &[(&str, &str)] = &[)

Tests

  • integration — system_one_preserves_the_typesafe_wire_shape() sends a POST to /agent-integrations/openrouter/systemone with a Jev request shape and asserts the response preserves the typed answers (noul type, noul value 0.98) and usage cost (0.00003).: Test passes and validates both request serialization and response parsing for the System One flow. (tests/openrouter.rs#async fn messages_speaks_the_anthropic_shape() {)
  • synchronization — generated_rust_routes_match_the_public_manifest() updates expected operationCount to 206 and public route length to 206 to account for the two new routes.: Ensures the generated Rust route list and the OpenAPI manifest stay in agreement. (tests/openapi_sync.rs#fn generated_rust_routes_match_the_public_manifest() {)
  • Unreviewed: tinysweeper/tests

Findings

No active actionable findings.

Resolved this pass

  • Synchronize the manifest with the new routes
  • Synchronize the manifest with the new route
  • Synchronize the manifest with the new routes
  • Synchronize the manifest with the new route
  • Synchronize the manifest with the new routes
  • Synchronize the manifest with the new route
  • Synchronize the manifest with the new routes
  • Synchronize the manifest with the new route

Could not review: tinysweeper/description, tinysweeper/tests

Before merge

  • Complete the tests review for tinysweeper/tests.
  • Complete the description review for tinysweeper/description.

How this fits together

flowchart LR
  n0["messages_speaks_the_anthropic_shape<br/>changed"]:::changed
  n1["openrouter_chat_completion"]:::impacted
  n2["...ng_is_rejected_before_it_reaches_the_wire"]:::impacted
  n3["the_video_flow_submits_polls_and_downloads"]:::impacted
  n4["get_openrouter_video"]:::impacted
  n5["openrouter_message"]:::impacted
  n6["openrouter_video_content"]:::impacted
  n0 -->|calls| n5
  n0 -->|tests| n5
  n2 -->|calls| n1
  n2 -->|tests| n1
  n2 -->|calls| n5
  n2 -->|tests| n5
  n3 -->|calls| n4
  n3 -->|tests| n4
  n3 -->|calls| n6
  n3 -->|tests| n6
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading
Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 2 files; 0 findings. _The code index is behind this pull request (indexed at `06ba4e4717cc`), so retrieved context may be out of date._ _3 memory call(s) failed (model: cortex: v1/answer: timed out after 20s), so this review saw part of what the engine holds._

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 2 files; 0 findings. _The code index is behind this pull request (indexed at `06ba4e4717cc`), so retrieved context may be out of date._ _3 memory call(s) failed (model: cortex: v1/answer: timed out after 20s), so this review saw part of what the engine holds._

tests

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: tinysweeper/tests
  • Lane summary: No reviewer could be consulted.

commits

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: Nothing sensitive found in what this pull request commits.

description

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: tinysweeper/description
  • Lane summary: No reviewer could be consulted.

e2e

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: No end-to-end harness in this repository: no e2e test files and no e2e workflow.
Evidence and run details
  • Models: flash, ladder/vectors, gpt-5.6-luna, deepseek/deepseek-v4-flash
  • Spend: $0.005925
  • Tokens: 98610 input · 2117 output · 7612 cached · 319 embedding
Head State Pass summary
ba7b4a65d1b2 incomplete 2 active finding(s), 0 resolved finding(s) (at 1789926060)
ba7b4a65d1b2 incomplete 2 active finding(s), 9 resolved finding(s) (at 1789926248)
24b70167e1d7 incomplete 0 active finding(s), 8 resolved finding(s) (at 1789926533)

tinysweeper 0.1.0

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 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-20T17:50:15.022807Z 24b7016 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.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Warning

Review limit reached

  • Run on-demand review

This review includes 3 billable files and costs up to $0.75.

Or wait 51 minutes for your next included review.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 516ab1c8-4d9b-439d-b395-9a2bf72f2b3e

📥 Commits

Reviewing files that changed from the base of the PR and between ba7b4a6 and 24b7016.

📒 Files selected for processing (3)
  • api/tinyhumans.backend.json
  • src/generated_public_routes.rs
  • tests/openapi_sync.rs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 9b0cea06-edbd-4104-8446-a43415da5986

📥 Commits

Reviewing files that changed from the base of the PR and between d56ffd5 and ba7b4a6.

📒 Files selected for processing (5)
  • api/tinyhumans.backend.json
  • src/api/agent_integrations/openrouter.rs
  • src/generated_public_routes.rs
  • tests/openapi_sync.rs
  • tests/openrouter.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

OpenRouter System One

Layer / File(s) Summary
Route contracts and registration
api/tinyhumans.backend.json, src/generated_public_routes.rs
The manifest and public route list add the two OpenRouter System One POST routes and update operation counts.
Client request support
src/api/agent_integrations/openrouter.rs
The API documents five request shapes and adds openrouter_system_one for serializable requests.
Route and wire-shape validation
tests/openapi_sync.rs, tests/openrouter.rs
Tests validate the updated route counts, request fields, and returned response values.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: codeghost21

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding OpenRouter System One client support.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch feat/openrouter-systemone
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

A rabbit sends typed questions bright
Through System One into the night
Two new paths hop into the chart
Answers and costs return intact
Five request shapes now share the start

Comment @coderabbitai help to get the list of available commands.

@tinysweeper tinysweeper 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.

Requesting changes: 2 lane(s) blocking, worst finding is critical.

Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.

          $0.0123 · 184,442 in / 6,527 out · 9,870 cached (5%) · flash, ladder/vectors, gpt-5.6-luna, deepseek/deepseek-v4-flash · 319 embedded
critique: $0.0068 · 99,483 in  / 3,390 out · 6,231 cached (6%) · gpt-5.6-luna
security: $0.0052 · 79,336 in  / 1,938 out · 3,639 cached (5%) · gpt-5.6-luna

Comment thread src/generated_public_routes.rs
@tinysweeper tinysweeper Bot added the priority: p0 Drop what you are doing. Data loss, a live break, or an exploitable hole. label Sep 20, 2026
@senamakel senamakel added priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. and removed priority: p0 Drop what you are doing. Data loss, a live break, or an exploitable hole. labels Sep 20, 2026

@tinysweeper tinysweeper 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.

Requesting changes: 2 lane(s) blocking, worst finding is critical.

Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.

             $0.0108 · 171,782 in / 6,549 out · 19,713 cached (11%) · ladder/vectors, gpt-5.6-luna, deepseek/deepseek-v4-flash · 319 embedded
critique:    $0.0054 · 82,401 in  / 3,767 out · 10,361 cached (13%) · gpt-5.6-luna, deepseek/deepseek-v4-flash
security:    $0.0049 · 78,125 in  / 2,085 out · 9,352 cached (12%)  · gpt-5.6-luna
description: $0.0003 · 7,540 in   / 86 out    · 0 cached (0%)       · deepseek/deepseek-v4-flash

Comment thread src/api/agent_integrations/openrouter.rs
@tinysweeper tinysweeper Bot added priority: p0 Drop what you are doing. Data loss, a live break, or an exploitable hole. and removed priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. labels Sep 20, 2026
…mone

# Conflicts:
#	api/tinyhumans.backend.json
#	tests/openapi_sync.rs

@tinysweeper tinysweeper 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.

tinysweeper found nothing blocking, but could not review everything, so this is not an approval: tinysweeper/description, tinysweeper/tests.

          $0.0059 · 98,610 in / 2,117 out · 7,612 cached (8%) · flash, ladder/vectors, gpt-5.6-luna, deepseek/deepseek-v4-flash · 319 embedded
critique: $0.0028 · 47,030 in / 548 out   · 4,050 cached (9%) · gpt-5.6-luna
security: $0.0028 · 45,816 in / 740 out   · 3,562 cached (8%) · gpt-5.6-luna

@tinysweeper tinysweeper Bot added priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. and removed priority: p0 Drop what you are doing. Data loss, a live break, or an exploitable hole. labels Sep 20, 2026
@senamakel
senamakel merged commit f0e9bf7 into main Sep 20, 2026
9 checks passed
@senamakel
senamakel deleted the feat/openrouter-systemone branch September 27, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant