-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat:Refactor LemurTaskParams schema to inline properties and update example #109
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
Sequence Diagram(s)sequenceDiagram
participant Client
participant API (LemurTaskParams)
Client->>API (LemurTaskParams): Submit request with prompt, final_model, transcript_ids/input_text, etc.
API (LemurTaskParams)-->>Client: Validate required fields (prompt, final_model), process request
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 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
📜 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)
5647-5685: Avoid copy-pasting LemurBaseParams – keep theallOfreference instead.By inlining
transcript_ids,input_text,final_model,max_output_size, andtemperaturehere we now maintain the same set of fields in two places (LemurBaseParamsandLemurTaskParams).
That creates an inevitable drift risk and doubles the surface for future edits.A minimal change that still lets you mark
final_modelas required (your apparent goal) is:components: schemas: LemurTaskParams: allOf: - type: object required: [prompt] properties: prompt: type: string description: … - $ref: '#/components/schemas/LemurBaseParams' required: [final_model] # << extra requirement layered on topThis keeps the single-source-of-truth in
LemurBaseParams, prevents drift, and keeps downstream SDK generation simpler.
[ suggest_essential_refactor ]
| 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.
final_model type was unintentionally narrowed – restores old behaviour
LemurBaseParams/final_model accepts either an enumerated model OR any arbitrary string via:
anyOf:
- $ref: '#/components/schemas/LemurModel'
- type: stringThe new definition replaces that with a oneOf that only allows the enum, silently breaking every existing client that was sending a custom model slug.
- oneOf:
- - $ref: "#/components/schemas/LemurModel"
+ anyOf:
+ - $ref: "#/components/schemas/LemurModel"
+ - type: stringPlease restore the union or this will be a breaking change in the public contract.
🤖 Prompt for AI Agents
In src/libs/AssemblyAI/openapi.yaml around lines 5664 to 5670, the type
definition for final_model was changed from a union allowing either a LemurModel
enum or any string to a oneOf that only allows the enum, which breaks existing
clients using custom strings. To fix this, revert the type definition to use
anyOf with both the LemurModel reference and a string type, restoring the
original union behavior and preventing breaking changes.
Pull request was closed
Summary by CodeRabbit
New Features
Documentation