Skip to content

Fix planner model deprecation (sarvam-30b -> sarvam-105b) and the logged Hindi skip-ahead bug - #6

Merged
NITISH-R-G merged 1 commit into
mainfrom
fix/hindi-skip-ahead
Jul 31, 2026
Merged

NITISH-R-G merged 1 commit into
mainfrom
fix/hindi-skip-ahead

Conversation

@NITISH-R-G

@NITISH-R-G NITISH-R-G commented Jul 31, 2026

Copy link
Copy Markdown
Owner

What changed

Set out to fix the logged bug (Hindi "skip ahead" resolving to the wrong step) and found something more urgent while re-verifying it live against the real API: sarvam-30b has been deprecated by Sarvam sometime between 2026-07-26 and now. A live call returns a hard 400 (Model 'sarvam-30b' has been deprecated... use sarvam-105b). The planner correctly nulls out and falls back to the deterministic engine on that error - by design, nothing crashes - but it means the planner (one of the five frozen core pieces) has been silently non-functional for every real call since the deprecation, with no visible signal beyond a debug-panel note.

  • Sarvam.PLANNER_MODEL -> sarvam-105b.
  • planner_v1.md now spells out skip-ahead phrasing across languages instead of one English example.
  • Both fixes re-verified live against the real API (not assumed), using the same six-case regression set from 07-26 plus the originally-failing case.

Why

The model deprecation is a production-breaking issue that would otherwise have shipped invisibly - CI has no live-key smoke test (correctly, since CI never has a key), so nothing would have caught this until a demo run went quiet on the planner.

What was tested

scripts/planner_case.ps1, six cases, all against live sarvam-105b:

case result
English baseline step=amount, correct
Hindi baseline step=amount, Devanagari, correct
Code-switch step=amount, correct
Hindi skip-ahead (the bug) step=submit - fixed
Correction step=account - see caveat below
Tamil step=amount, Tamil script, correct

assembleDebug + testDebugUnitTest green.

Still needs verification

  • Latency got worse: planner is now 1261-3300ms (was 867-1481ms) - 105B is a bigger model. Still bounded by the existing 5s hard call timeout. Documented honestly in docs/PARKING_LOT.md rather than hidden.
  • One behavior change, not clearly a regression: the "correction" case ("I made a mistake") now returns a different step than before. Not obviously wrong (there's no clean "go back" target from step one), but flagged for a second look rather than silently accepted.
  • STT and TTS latency were not re-measured in this pass (only the planner was touched).

Summary by Sourcery

Swap the Sarvam planner from the deprecated sarvam-30b model to sarvam-105b and document the resulting latency and behavioral changes, while fixing Hindi skip-ahead handling in the planner prompt and keeping core contracts conceptually consistent.

Bug Fixes:

  • Fix Hindi skip-ahead utterances so they correctly jump to the submit step by expanding multilingual skip-ahead examples in the planner prompt.

Enhancements:

  • Update the planner model constant and all references from Sarvam-30B to Sarvam-105B, ensuring the planner remains part of the frozen core while using the supported API model.
  • Document the forced planner model migration, new latency measurements, and a notable behavior change in correction handling in the latency parking lot and data-handling docs.
  • Clarify current language coverage and remaining gaps for phrases and overlay labels, and note a parked issue around brittle ride-booking step matching.

Documentation:

  • Refresh README, CONTRIBUTING, SECURITY, and DATA_HANDLING docs to reference the Sarvam-105B planner and describe its role and data flow in the core architecture.

Tests:

  • Update the planner regression PowerShell script to target sarvam-105b for live verification of the six-case set, including the previously failing Hindi skip-ahead case.

Set out to fix the known bug logged in PARKING_LOT.md ("सीधे submit पर ले
चलो" resolves to the wrong step) and found something more urgent while
re-verifying it live: Sarvam deprecated sarvam-30b sometime between 2026-07-26
and 2026-07-31. A live planner call now returns a hard 400
("Model 'sarvam-30b' has been deprecated... use sarvam-105b"), which the
planner correctly turns into a null and falls back to the deterministic
StepEngine - but that means the planner, one of the five frozen core pieces,
has been silently dead for every real call in the meantime, with nothing
surfacing it beyond a debug-panel note nobody was watching.

- Sarvam.PLANNER_MODEL -> "sarvam-105b", re-verified live against the same
  six-case regression set used on 07-26 (scripts/planner_case.ps1, updated
  to match).
- planner_v1.md now enumerates skip-ahead phrasing across languages
  explicitly instead of one English example. Re-verified live: the exact
  failing case now returns step=submit.
- Documented in docs/PARKING_LOT.md, honestly: the model swap is a net
  latency regression (roughly doubled, 1261-3300ms vs 867-1481ms - still
  capped by the existing 5s call timeout), and one case's behavior changed
  in a way that isn't clearly better or worse (a "I made a mistake"
  correction on the first step now moves forward instead of re-prompting).
  Not chasing that further in this pass - logged, not silently smoothed over.
- Corrected two other things found stale while in this file: the
  Parked-items note claiming Tamil isn't authored (it is, from the taxi
  work), and every remaining "Sarvam-30B" reference in prose/docs.

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

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@NITISH-R-G, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1a8ddc7e-49a3-40f8-bcff-14b65af9ed7f

📥 Commits

Reviewing files that changed from the base of the PR and between 0309c07 and 0985e64.

📒 Files selected for processing (11)
  • .github/ISSUE_TEMPLATE/feature_request.md
  • CONTRIBUTING.md
  • README.md
  • SECURITY.md
  • app/src/main/assets/prompts/planner_v1.md
  • app/src/main/java/com/screensaathi/sarvam/Sarvam.kt
  • app/src/main/java/com/screensaathi/sarvam/SarvamPlanner.kt
  • app/src/main/java/com/screensaathi/session/SessionController.kt
  • docs/DATA_HANDLING.md
  • docs/PARKING_LOT.md
  • scripts/planner_case.ps1

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.

@sourcery-ai

sourcery-ai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR swaps the deprecated Sarvam planner model from sarvam-30b to sarvam-105b, updates the planner prompt to correctly handle multilingual skip-ahead requests (fixing a logged Hindi bug), and refreshes documentation, scripts, and contributor guidance to reflect the new model and its latency/behavior characteristics.

Sequence diagram for Sarvam-105B planner call and deterministic fallback

sequenceDiagram
    title Sarvam-105B planner sequence with deterministic StepEngine fallback
    actor User
    participant SessionController
    participant SaarasStt
    participant SarvamPlanner
    participant SarvamApi
    participant StepEngine
    participant OverlayService
    participant SarvamTts

    User->>SessionController: mic_tap
    SessionController->>SaarasStt: SarvamStt
    SaarasStt-->>SessionController: transcript + language

    SessionController->>SarvamPlanner: SarvamPlanner
    SarvamPlanner->>SarvamApi: Sarvam.plannerHttp (model sarvam-105b)

    alt [plannerHttp succeeds]
        SarvamApi-->>SarvamPlanner: set_plan
        SarvamPlanner-->>SessionController: step + target + instruction + language
        SessionController->>OverlayService: OverlayService
        SessionController->>SarvamTts: SarvamTts
    else [plannerHttp 400 deprecation or other failure]
        SarvamApi-->>SarvamPlanner: null
        SarvamPlanner-->>SessionController: null
        SessionController->>StepEngine: StepEngine
        StepEngine-->>SessionController: step + target (deterministic)
        SessionController->>OverlayService: OverlayService
    end
Loading

File-Level Changes

Change Details Files
Switch planner calls and configuration from deprecated sarvam-30b to sarvam-105b and document the forced swap and its impact.
  • Update Sarvam.PLANNER_MODEL constant to use sarvam-105b, with explanatory comments about the deprecation and live re-verification.
  • Adjust planner API documentation and data-handling docs to refer to Sarvam-105B planner instead of Sarvam-30B.
  • Update README flow diagram and core-piece descriptions to reference Sarvam-105B planner.
  • Update SECURITY and CONTRIBUTING/ISSUE_TEMPLATE text so the frozen core piece is named Sarvam-105B planner.
  • Change scripts/planner_case.ps1 to send model: sarvam-105b for live regression cases.
  • Expand PARKING_LOT latency table to include pre/post-swap measurements and narrative about the mandatory model swap and the resulting higher planner latency.
app/src/main/java/com/screensaathi/sarvam/Sarvam.kt
docs/DATA_HANDLING.md
README.md
SECURITY.md
CONTRIBUTING.md
.github/ISSUE_TEMPLATE/feature_request.md
scripts/planner_case.ps1
docs/PARKING_LOT.md
Improve planner prompt to explicitly enumerate multilingual skip-ahead phrasing and mark the previously logged Hindi bug as fixed, while updating parked items around language coverage and taxi flow caveats.
  • Modify planner_v1.md prompt instructions so skip-ahead phrases are spelled out across English, Hindi, and Tamil, clarifying that all such phrases should jump directly to the last step.
  • Mark the previous parked Hindi skip-ahead bug as fixed, referencing the prompt change and live verification in PARKING_LOT.md.
  • Refresh parked items to reflect current language coverage (English/Hindi/Tamil) and to add notes about remaining language UX gaps and taxi-flow button text brittleness.
app/src/main/assets/prompts/planner_v1.md
docs/PARKING_LOT.md
Align orchestration and planner documentation comments with the new Sarvam-105B planner naming and behavior.
  • Update SarvamPlanner.kt class-level documentation to describe it as the Sarvam-105B planner while preserving tool-call and latency rationale.
  • Adjust SessionController.kt comments to describe the Sarvam voice loop using the Sarvam-105B planner.
  • Ensure all references to the planner in docs and comments consistently use Sarvam-105B naming.
app/src/main/java/com/screensaathi/sarvam/SarvamPlanner.kt
app/src/main/java/com/screensaathi/session/SessionController.kt
README.md
SECURITY.md
CONTRIBUTING.md
.github/ISSUE_TEMPLATE/feature_request.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@NITISH-R-G
NITISH-R-G marked this pull request as ready for review July 31, 2026 12:54
@NITISH-R-G
NITISH-R-G merged commit 0814733 into main Jul 31, 2026
3 checks passed

@sourcery-ai sourcery-ai 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.

Sorry @NITISH-R-G, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@NITISH-R-G
NITISH-R-G deleted the fix/hindi-skip-ahead branch July 31, 2026 12:54

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

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