-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat:Expand LemurTaskParams schema and flatten inheritance in OpenAPI spec #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🧹 Nitpick comments (1)
src/libs/AssemblyAI/openapi.yaml (1)
5671-5675: Optional: add an explicitmaximumformax_output_sizeThe description says “up to 4000”, but the schema does not enforce that upper bound.
Addingmaximum: 4000would let tooling catch invalid requests early.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.LemurTaskParams.g.csis excluded by!**/generated/**src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParams.g.csis excluded by!**/generated/**src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParamsVariant1.g.csis 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 (2)
src/libs/AssemblyAI/Conversions/LemurTaskParams.cs (2)
struct(5-36)FromPrompt(25-35)src/libs/AssemblyAI/Conversions/LemurTaskParamsVariant1.cs (2)
FromPrompt(24-30)LemurTaskParamsVariant1(5-31)
| transcript_ids: | ||
| x-label: Transcript IDs | ||
| description: | | ||
| A list of completed transcripts with text. Up to a maximum of 100 hours of audio. | ||
| Use either transcript_ids or input_text as input into LeMUR. | ||
| type: array | ||
| items: | ||
| x-label: Transcript ID | ||
| type: string | ||
| format: uuid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
DRY violation – properties copied instead of re-using LemurBaseParams
transcript_ids (and the other newly inlined fields) now exist in two places: LemurBaseParams and LemurTaskParams.
Keeping two authoritative copies will inevitably diverge and complicate future changes or docs generation.
Consider reverting to the previous compositional style:
allOf:
- $ref: '#/components/schemas/LemurBaseParams'
- type: object
additionalProperties: false
properties:
prompt:
...This keeps the contract identical while avoiding duplication.
🤖 Prompt for AI Agents
In src/libs/AssemblyAI/openapi.yaml around lines 5647 to 5656, the properties
like transcript_ids are duplicated in both LemurBaseParams and LemurTaskParams,
violating DRY principles. To fix this, revert to using the allOf composition
style by referencing LemurBaseParams in LemurTaskParams with $ref, then add only
the additional properties specific to LemurTaskParams. This removes duplication
and keeps the schema consistent and maintainable.
| 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking change – final_model no longer accepts arbitrary model IDs
Previously (LemurBaseParams) the schema allowed either one of the enumerated LemurModel values or any free-form string via:
anyOf:
- $ref: '#/components/schemas/LemurModel'
- type: stringThe new definition uses oneOf with only the enum, silently preventing custom model slugs that existing clients may rely on.
Unless this is intentional, switch back to anyOf (enum + string) to preserve backward compatibility.
- oneOf:
- - $ref: '#/components/schemas/LemurModel'
+ anyOf:
+ - $ref: '#/components/schemas/LemurModel'
+ - type: string🤖 Prompt for AI Agents
In src/libs/AssemblyAI/openapi.yaml around lines 5664 to 5670, the schema for
final_model uses oneOf with only the LemurModel enum, which disallows arbitrary
string model IDs and breaks backward compatibility. Change oneOf back to anyOf
and include both the LemurModel enum reference and a type string option to allow
custom model slugs as before.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation