-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat:Refactor LemurTaskParams schema to inline properties and update fields #108
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 schema for 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: 1
🔭 Outside diff range comments (1)
src/libs/AssemblyAI/openapi.yaml (1)
5643-5663:contextfield was dropped – this is a breaking API change
LemurTaskParamspreviously inheritedcontextfromLemurBaseParams; after the in-place expansion the field is missing.
Any client code that relies on passing conversation context will now fail schema validation.If the omission is intentional, bump the major version and document the migration path.
Otherwise, re-introduce the property (or keep delegating toLemurBaseParams) to preserve backward compatibility.
🧹 Nitpick comments (1)
src/libs/AssemblyAI/openapi.yaml (1)
5647-5685: Code duplication – consider reverting to$refinheritanceBy inlining all properties from
LemurBaseParamsyou now maintain the same definitions twice (transcript_ids,input_text,max_output_size,temperature, etc.).
This increases drift risk – a future edit to the base schema will not propagate here.Re-use
$ref(composition) and extend only where the task schema truly diverges (e.g.,prompt, extrarequiredlist).
📜 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)
🔇 Additional comments (1)
src/libs/AssemblyAI/openapi.yaml (1)
5684-5686: Requiredfinal_modelclashes with its own default and existing behaviour
final_modelis now listed inrequired, meaning callers must always supply it.
However:
- A default of
"default"is still provided – redundant once the field is required.- The C# helpers (
FromPrompt, etc.) relied on the absence of the field to inject"default"automatically, so generation code will now emit payloads that violate the new schema.Either:
- Drop
final_modelfromrequired(maintains current UX), or- Remove the default and update SDK generators / helpers accordingly.
| 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.
🛠️ Refactor suggestion
final_model typing narrowed and loses free-form fallback
LemurBaseParams uses
anyOf:
- $ref: "#/components/schemas/LemurModel"
- type: string # allow future / custom model IDsHere the replacement switches to a oneOf with only the enum reference, forbidding arbitrary strings.
This silently breaks clients that send unreleased / private model names and removes forward-compatibility.
Consider restoring the anyOf union or leaving the property in the shared base schema.
🤖 Prompt for AI Agents
In src/libs/AssemblyAI/openapi.yaml around lines 5664 to 5670, the final_model
property was changed from an anyOf union allowing both LemurModel references and
arbitrary strings to a oneOf with only the LemurModel reference, which removes
support for custom or future model IDs. To fix this, revert the change to use
anyOf with both the LemurModel schema reference and a string type to preserve
forward compatibility and allow free-form model identifiers.
Pull request was closed
Summary by CodeRabbit
New Features
final_model) a required field for tasks.Documentation