Skip to content

Add OpenAI-compatible PR recap providers - #2008

Merged
steve8708 merged 8 commits into
BuilderIO:mainfrom
CheckPickerUpper:codex/provider-neutral-visual-recap
Jul 11, 2026
Merged

steve8708 merged 8 commits into
BuilderIO:mainfrom
CheckPickerUpper:codex/provider-neutral-visual-recap

Conversation

@CheckPickerUpper

Copy link
Copy Markdown
Contributor

What this does

Adds one provider-neutral openai-compatible PR Visual Recap backend. DeepSeek, Kimi, and other compatible APIs configure through VISUAL_RECAP_API_KEY, VISUAL_RECAP_BASE_URL, and VISUAL_RECAP_MODEL; Claude and Codex remain unchanged.

The generated workflow, reusable workflow, fork workflow, setup/doctor commands, docs, and tests all use the same canonical provider path. DeepSeek and Kimi are aliases for the generic backend rather than separate implementation forks.

Configuration example

VISUAL_RECAP_AGENT: openai-compatible
VISUAL_RECAP_BASE_URL: https://api.deepseek.com/v1
VISUAL_RECAP_MODEL: deepseek-chat

Store the provider key in the repository secret VISUAL_RECAP_API_KEY. Kimi can use its compatible API base URL and model in the same variables.

Verification

  • pnpm --filter @agent-native/core exec vitest --run src/cli/recap.spec.ts --maxWorkers=25% — 184 passed.
  • oxfmt --check — passed.
  • Prettier checks for the three workflows and English docs — passed.
  • git diff --check — passed.
  • Full package typecheck is NOT DONE: this checkout has unrelated existing toolkit/UI export errors, including missing dropdown, tooltip, popover, and collaboration UI exports. No modified recap file errors were reported.

Follow-up

English PR Visual Recap documentation is updated. The localized documents under packages/core/docs/content/locales/ need translation follow-up.

Tracking

The Jakuta Review Bot issue path could not create a tracking issue in BuilderIO: that owner is outside the configured JAKUTA_ALLOWED_OWNERS safety allowlist. No personal-token issue was created and the allowlist was not widened.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Visual recap — skipped

The visual recap job did not run for this pull request. This is informational only and does not block the PR.

Recap skipped for 6c88c46: external fork PR requires a maintainer to apply the recap label to the current head SHA.

builder-io-integration[bot]

This comment was marked as outdated.

@steve8708

Copy link
Copy Markdown
Contributor

great idea @CheckPickerUpper - couple PR comments that would be good to address with them if you agree

builder-io-integration[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor Author

Addressed in commit 128a2936f. The shared recap gate and all workflow variants now require a non-empty VISUAL_RECAP_MODEL whenever VISUAL_RECAP_AGENT resolves to openai-compatible, so DeepSeek/Kimi/custom providers cannot fall through to an OpenAI default model. Added regression coverage; the focused suite passes (240 tests).

builder-io-integration[bot]

This comment was marked as outdated.

builder-io-integration[bot]

This comment was marked as outdated.

@steve8708

Copy link
Copy Markdown
Contributor

great, thanks @CheckPickerUpper - couple more popped in on the latest :D

@builder-io-integration builder-io-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.

Builder reviewed your changes and found 2 potential issues 🟡

Review Details

This incremental update addresses the two previously open concerns well. I verified that the OpenAI-compatible execution path no longer runs with broad full-auto local tooling: it now uses a restricted recap-source tool profile with auto-edit, disables MCP loading for that profile, and limits output to the recap source artifact. I also verified that the generic fallback rate-card problem was addressed by adding explicit unavailable cost handling for compatible-provider runs, and I resolved both prior review threads.

Risk remains standard (medium) because this PR changes shared workflow, CLI, and usage-accounting infrastructure rather than UI. The overall direction is strong: provider-specific model IDs are preserved at runtime, setup/doctor/gate parity is much tighter, and the new cost-resolution path is better aligned with honest reporting.

I found two follow-up issues in the latest changes. First, the new compatible-provider validator still rejects provider-defined model IDs that contain characters like /, even though the runtime now explicitly preserves custom IDs for endpoint-backed engines. Second, the shared usage table still coerces costSource: "unavailable" runs to zero cost in aggregate summaries, which under-reports spend as if those recap runs were free.

🧪 Browser testing: Skipped — PR only modifies backend/config/docs/tests, no UI impact.

Comment thread packages/core/src/cli/recap.ts Outdated
requirement: modelRequirement,
reason: "VISUAL_RECAP_MODEL is required (openai-compatible backend)",
});
} else if (!RECAP_MODEL_PATTERN.test(rawModel)) {

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.

🟡 Compatible-provider model validation still rejects slash-qualified model IDs

This validator still enforces ^[a-zA-Z0-9._-]{1,80}$, so provider-defined IDs like openai/gpt-oss-120b are rejected in setup/doctor/gate even though the runtime now preserves custom model IDs for compatible endpoints. Please relax the OpenAI-compatible validation path so it matches the new runtime behavior.

Additional Info
Manually verified in the shared openai-compatible validator. Also reported by 1/4 review agents.

Fix in Builder

const costX100 =
costCentsX100 ??
calculateCost(inTok, outTok, modelName, cacheReadTokens, cacheWriteTokens);
resolvedCostSource === "unavailable"

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.

🟡 Unavailable recap cost is still collapsed to zero in shared usage summaries

When costSource === "unavailable", this writes cost_cents_x100 = 0, and the existing usage summaries still sum that column directly. That makes compatible-provider recap runs look free in shared billing/usage totals instead of preserving the unknown-cost state.

Additional Info
Manually verified against getUsageSummary(), which aggregates SUM(cost_cents_x100) without excluding unavailable rows. Also reported by 1/4 review agents.

Fix in Builder

@CheckPickerUpper
CheckPickerUpper force-pushed the codex/provider-neutral-visual-recap branch from b4059ee to 6c88c46 Compare July 10, 2026 19:53
@builder-io-integration

Copy link
Copy Markdown
Contributor

Review Agent skipped this PR — @CheckPickerUpper doesn't have a Builder seat in this space.

If you're @CheckPickerUpper: you may already have a seat under a different GitHub account. Reconnect GitHub

If you're an admin: Add @CheckPickerUpper to this space

@steve8708

Copy link
Copy Markdown
Contributor

looks great, thanks @CheckPickerUpper !

@steve8708
steve8708 merged commit 2308575 into BuilderIO:main Jul 11, 2026
24 checks passed
steve8708 pushed a commit that referenced this pull request Sep 3, 2026
* Add OpenAI-compatible PR recap providers

* Complete compatible recap provider support

* Require models for compatible recap providers

* Keep recap setup and doctor aligned

* Constrain compatible recap agent tools

* Record unknown recap costs honestly

* Allow provider-qualified recap models

* Preserve unknown spend in usage summaries
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