Skip to content

fix(auto-model): fix auto model - #6144

Merged
Sg312 merged 1 commit into
stagingfrom
fix/auto-model
Aug 1, 2026
Merged

fix(auto-model): fix auto model#6144
Sg312 merged 1 commit into
stagingfrom
fix/auto-model

Conversation

@Sg312

@Sg312 Sg312 commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix auto model

Type of Change

  • Bug fix

Testing

Manual

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 1, 2026 12:07am

Request Review

@greptile-apps

greptile-apps Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR extends sim-auto resolution to evaluator and router handlers.

  • Resolves the pseudo-model before provider validation and execution.
  • Preserves sim-auto as the public output model while using the selected concrete model internally.
  • Adds billable model-routing cost to block output totals.
  • Adds coverage for evaluator and router V2 auto-model execution and routing-cost accounting.

Confidence Score: 5/5

The PR appears safe to merge with no concrete changed-code failure identified.

The evaluator and router paths resolve and validate the concrete provider model before invocation, retain established auto-model output behavior, and add the separate classifier charge exactly once to the settled provider total.

Important Files Changed

Filename Overview
apps/sim/executor/handlers/evaluator/evaluator-handler.ts Resolves sim-auto before evaluator execution, validates the selected model, and includes routing cost while preserving the pseudo-model output identity.
apps/sim/executor/handlers/router/router-handler.ts Adds shared auto-model resolution to both router implementations and consistently applies the selected model, preamble, and routing cost.
apps/sim/lib/model-router/resolve.ts Introduces a focused helper that adds a positive billable routing charge to an already-settled provider cost.

Sequence Diagram

sequenceDiagram
  participant Block as Evaluator/Router
  participant Resolver as Auto Model Resolver
  participant Provider as Selected Provider
  Block->>Resolver: Resolve sim-auto from task signals
  Resolver-->>Block: Concrete model and routing cost
  Block->>Block: Validate selected model
  Block->>Provider: Execute using concrete model
  Provider-->>Block: Result and provider cost
  Block->>Block: Add billable routing cost
  Block-->>Block: Return output with model sim-auto
Loading

Reviews (1): Last reviewed commit: "Fix auto model" | Re-trigger Greptile

@Sg312
Sg312 merged commit 88f054e into staging Aug 1, 2026
26 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/auto-model branch August 1, 2026 04:19
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