Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Aug 1, 2025

Summary by CodeRabbit

  • New Features

    • Expanded task parameter options for Lemur, allowing additional configuration such as transcript IDs, input text, model selection, output size, and temperature settings.
  • Documentation

    • Updated schema documentation to reflect new required fields and revised example usage.

@coderabbitai
Copy link

coderabbitai bot commented Aug 1, 2025

Walkthrough

The schema for LemurTaskParams in the OpenAPI YAML file was refactored to inline properties previously inherited from LemurBaseParams. New properties were added directly, required fields were updated, and the example was modified by removing the context field.

Changes

Cohort / File(s) Change Summary
OpenAPI Schema Refactor
src/libs/AssemblyAI/openapi.yaml
Refactored LemurTaskParams to remove inheritance from LemurBaseParams, inlined its properties, updated required fields, and modified the example by removing context.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Poem

In YAML fields, a rabbit hops,
Inheriting less, but never stops.
Lemur tasks now stand alone,
With properties clearly shown.
No more context, just prompt and model,
Schema neat, no need to coddle.
🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bot/update-openapi_202508010412

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@HavenDV HavenDV enabled auto-merge (squash) August 1, 2025 04:13
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Refactor LemurTaskParams schema to inline properties and update fields Aug 1, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔭 Outside diff range comments (1)
src/libs/AssemblyAI/openapi.yaml (1)

5643-5656: Property duplication – please keep single-source via allOf

transcript_ids and input_text are now hard-coded again in LemurTaskParams, while they still live in LemurBaseParams.
Duplicating these definitions bloats the spec and will inevitably drift (e.g. the descriptive copy already differs slightly). Prefer reverting to the previous allOf: [ $ref: #/components/schemas/LemurBaseParams ] approach or, if inheritance must go, delete them from LemurBaseParams to maintain one canonical definition.

🧹 Nitpick comments (1)
src/libs/AssemblyAI/openapi.yaml (1)

5671-5686: Required vs default contradiction

final_model is now declared required and given a default "default". Requiring a field that already has a server-side default is redundant and forces clients to send unnecessary data. Drop it from required if the default is kept, or drop the default if you truly need the caller to specify.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eaafad3 and 1c6692d.

⛔ Files ignored due to path filters (3)
  • src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.LemurTaskParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParamsVariant1.g.cs is excluded by !**/generated/**
📒 Files selected for processing (1)
  • src/libs/AssemblyAI/openapi.yaml (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/libs/AssemblyAI/openapi.yaml (1)
src/libs/AssemblyAI/Conversions/LemurTaskParams.cs (2)
  • struct (5-36)
  • FromPrompt (25-35)

Comment on lines +5657 to +5663
input_text:
x-label: Input text
description: |
Custom formatted transcript data. Maximum size is the context limit of the selected model.
Use either transcript_ids or input_text as input into LeMUR.
type: string
final_model:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

context field silently dropped

LemurBaseParams exposes an optional context attribute that many clients rely on. By inlining properties you removed it from LemurTaskParams, so POST /lemur/v3/generate/task will now reject valid payloads that worked before. Re-add context here (or restore the base-schema reference).

🤖 Prompt for AI Agents
In src/libs/AssemblyAI/openapi.yaml around lines 5657 to 5663, the optional
'context' field from LemurBaseParams was removed when inlining properties,
causing valid payloads to be rejected. To fix this, re-add the 'context' field
explicitly in LemurTaskParams or restore the reference to the base schema that
includes 'context' so that the POST /lemur/v3/generate/task endpoint accepts the
previously valid payloads.

Comment on lines +5664 to +5670
x-label: Final model
description: |
The model that is used for the final prompt after compression is performed.
default: "default"
oneOf:
- $ref: "#/components/schemas/LemurModel"
max_output_size:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

final_model type overly restrictive

Changing anyOfoneOf eliminates the “free-form string” escape hatch clients used for unreleased models. Unless that is an intentional breaking change, keep anyOf with an additional type: string branch:

-              oneOf:
+              anyOf:
                 - $ref: "#/components/schemas/LemurModel"
+                - type: string

Allow free-form strings for final_model

Revert the schema to use anyOf with an extra type: string branch so clients can still pass unreleased model names without breaking:

  • File: src/libs/AssemblyAI/openapi.yaml (around lines 5664–5670)

Required change:

-              oneOf:
-                - $ref: "#/components/schemas/LemurModel"
+              anyOf:
+                - $ref: "#/components/schemas/LemurModel"
+                - type: string
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
x-label: Final model
description: |
The model that is used for the final prompt after compression is performed.
default: "default"
oneOf:
- $ref: "#/components/schemas/LemurModel"
max_output_size:
x-label: Final model
description: |
The model that is used for the final prompt after compression is performed.
default: "default"
anyOf:
- $ref: "#/components/schemas/LemurModel"
- type: string
max_output_size:
🤖 Prompt for AI Agents
In src/libs/AssemblyAI/openapi.yaml around lines 5664 to 5670, the schema for
final_model currently uses oneOf with only a reference to LemurModel, which
restricts it to predefined models. To allow free-form strings for final_model,
change oneOf to anyOf and add an additional branch with type: string. This lets
clients pass unreleased or custom model names without breaking validation.

@HavenDV HavenDV closed this Aug 1, 2025
auto-merge was automatically disabled August 1, 2025 09:06

Pull request was closed

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