Skip to content

Expose laya-serve's full usage report on Result - #58

Merged
marcreichel merged 1 commit into
mainfrom
feat/usage-report-20
Oct 12, 2026
Merged

marcreichel merged 1 commit into
mainfrom
feat/usage-report-20

Conversation

@marcreichel

Copy link
Copy Markdown
Owner

Summary

  • Result now reads the rest of laya-serve's usage report: stateTokens, stateTokensDropped, truncatedQuestions and collapsedOptions (a new CollapsedOptions per question id with total, distinct and tokensPerOption).
  • Every field is optional. TypeSafe-spec servers and laya-serve with LAYA_JEV_STRICT=1 send only input_tokens and output_tokens, so missing or malformed values become null or empty lists. Parsing lives in Result::fromArray, so predict, batch and cache hits all get the fields.
  • laya:try names the cut-off questions and the dropped tokens in its truncation warning, and the --json output includes the whole report.
  • The README documents the new fields next to truncated.

Closes #20

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1335f073-9720-418f-a680-70c25c5bb312

📥 Commits

Reviewing files that changed from the base of the PR and between 41de53c and 6f22bc6.


📒 Files selected for processing (6)
  • README.md
  • src/CollapsedOptions.php
  • src/Laravel/TryCommand.php
  • src/Result.php
  • tests/LayaTest.php
  • tests/TryCommandTest.php

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@marcreichel
marcreichel merged commit e3b47eb into main Oct 12, 2026
6 checks passed
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.

Expose the full usage report on Result (truncated questions, dropped tokens, collapsed options)

1 participant