-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat:Expand OpenAPI: assistant lifecycle, planning/routes, MCP, vector store #205
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughExpanded OpenAPI spec in src/libs/AI21/openapi.yaml to add assistant lifecycle endpoints, plan/route management, assistant run/validation, MCP discovery, and a vector-store retrieval endpoint. Introduced new schemas, enums, and tool definitions with a discriminator-based ToolDefinition, and updated multiple request bodies to include vector_store_id and budget/visibility fields. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant S as Studio API
participant A as Assistant Service
participant P as Plan Service
participant R as Route Service
Note over C,S: Assistant lifecycle (create/modify)
C->>S: POST /assistants (CreateAssistantRequest)
S->>A: CreateAssistant
A-->>S: Assistant
S-->>C: 200 Assistant
C->>S: PATCH /assistants/{assistant_id}
S->>A: ModifyAssistant
A-->>S: Assistant
S-->>C: 200 Assistant
rect rgba(230,245,255,0.5)
Note over C,S: Plans and Routes management
C->>S: GET/POST /assistants/{id}/plans
S->>P: List/Create Plan
P-->>S: ListPlansResponse/Plan
S-->>C: 200
C->>S: GET/PATCH /assistants/{id}/plans/{plan_id}
S->>P: Get/Modify Plan
P-->>S: Plan
S-->>C: 200
C->>S: GET/POST /assistants/{id}/routes
S->>R: List/Create Route
R-->>S: ListRoutesResponse/AssistantRoute
S-->>C: 200
C->>S: GET/PATCH/DELETE /assistants/{id}/routes/{route_id}
S->>R: Get/Modify/Delete Route
R-->>S: AssistantRoute/OK
S-->>C: 200
end
rect rgba(240,255,240,0.5)
Note over C,S: Run & Validate
C->>S: POST /assistants/{id}/validate_plan
S->>P: Validate Plan
P-->>S: ValidationResult
S-->>C: 200
C->>S: POST /assistants/{id}/run (RunAssistantRequest)
S->>A: Execute Run (tools, optimization)
alt success
A-->>S: MaestroRunResult
S-->>C: 200 MaestroRunResult
else error
A-->>S: MaestroRunResult{error}
S-->>C: 200 MaestroRunResult{error}
end
end
sequenceDiagram
autonumber
participant C as Client
participant S as Studio API
participant D as MCP Discovery
Note over C,S: MCP Tool discovery
C->>S: POST /mcp/discover (MCPDefinition)
S->>D: Discover(MCPDefinition)
D-->>S: MCPDiscoveryResponse (tools)
S-->>C: 200 MCPDiscoveryResponse
sequenceDiagram
autonumber
participant C as Client
participant S as Studio API
participant V as Vector Store
Note over C,S: Vector-store retrieval
C->>S: GET /demos/regulations/vector-store/{vector_store_id}
S->>V: Fetch(vector_store_id)
V-->>S: Object
S-->>C: 200 Object
opt invalid id
S-->>C: 422 Validation Error
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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. Comment |
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: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/libs/AI21/openapi.yaml (1)
3528-3529
: Fix broken $ref to misspelled schema.
Update items.$ref to the corrected schema name.- $ref: '#/components/schemas/IgnestionBatchStatusCount' + $ref: '#/components/schemas/IngestionBatchStatusCount'
🧹 Nitpick comments (6)
src/libs/AI21/openapi.yaml (6)
1018-1043
: New vector-store GET endpoint looks good; tiny title nit.
The path/params/responses are consistent. Title at Line 1036 has double spaces; optional tidy.
2132-2166
: Assistant schema: align tool_resources and optimization with new types.
- Prefer ToolResource over legacy AssistantToolResource for consistency with CreateMaestroRunsPayload.
- Consider making optimization an enum (RunOptimization) vs plain string for stronger typing.
Apply:
tools: title: Tools type: array items: $ref: '#/components/schemas/language_studio_api_server__data_types__execution_engine__ToolDefinition' - tool_resources: - $ref: '#/components/schemas/AssistantToolResource' + tool_resources: + $ref: '#/components/schemas/ToolResource' - optimization: - title: Optimization - type: string + optimization: + $ref: '#/components/schemas/RunOptimization'
3402-3485
: HTTP tool definitions: minor schema‑of‑schema caveat.
HTTPToolFunctionParameters models JSON Schema; naming a property “additionalProperties” may confuse consumers vs the JSON Schema keyword. Consider renaming the field (e.g., allow_additional_properties) or documenting intent.
3674-3688
: MCPDefinition: add URI format for server_url.
Improves validation and docs.MCPDefinition: properties: server_url: title: Server Url - type: string + type: string + format: uri
3907-3960
: ModifyAssistantRequest: align tool_resources to ToolResource.
Currently references AssistantToolResource while other payloads use ToolResource.- tool_resources: - $ref: '#/components/schemas/AssistantToolResource' + tool_resources: + $ref: '#/components/schemas/ToolResource'
4478-4495
: WebSearchToolResource: OK.
Fields aligned; consider adding allowed_domains in future.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (136)
src/libs/AI21/Generated/AI21..JsonSerializerContext.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Ai21Api.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGet.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Ai21Api.McpToolDiscoveryStudioV1McpDiscoverPost.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Ai21Api.UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Ai21Api.V1ConversationalRag.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Ai21Api.V1CreateAssistant.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Ai21Api.V1MaestroRun.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Ai21Api.V1ModifyAssistant.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Ai21Api.V1RunAssistant.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.IAi21Api.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGet.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.IAi21Api.McpToolDiscoveryStudioV1McpDiscoverPost.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.IAi21Api.UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.IAi21Api.V1ConversationalRag.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.IAi21Api.V1CreateAssistant.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.IAi21Api.V1MaestroRun.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.IAi21Api.V1ModifyAssistant.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.IAi21Api.V1RunAssistant.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.IJambaCompleteClient.V1ChatComplete.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.AssistantResponseLanguage.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.AssistantResponseLanguageNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.AssistantType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.AssistantTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.BudgetLevel.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.BudgetLevelNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceLabelsFilterMode.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceLabelsFilterModeNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceResponseLanguage.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceResponseLanguageNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolFunctionParametersType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolFunctionParametersTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolResourceType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolResourceTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.MCPToolResourceType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.MCPToolResourceTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.ModifyAssistantRequestResponseLanguage.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.ModifyAssistantRequestResponseLanguageNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.RunAssistantRequestResponseLanguage.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.RunAssistantRequestResponseLanguageNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.RunOptimization.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.RunOptimizationNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.Visibility.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.VisibilityNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.WebSearchToolResourceType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonConverters.WebSearchToolResourceTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.JsonSerializerContextTypes.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.Assistant.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.AssistantResponseLanguage.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.AssistantType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.BodyUploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.BudgetLevel.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.ChatRequest.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.ConversationalRagConfig.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.ConversationalRagConfigResponseLanguage.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.ConversationalRagConfigRetrievalStrategy.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.CreateAssistantRequest.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.CreateAssistantRequest.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestToolResources.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestToolResources.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayload.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadResponseLanguage.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.FileSearchToolResource.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.FileSearchToolResource.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceLabelsFilterMode.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceResponseLanguage.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolEndpoint.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolEndpoint.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolEndpointHeaders.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolEndpointHeaders.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolFunction.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolFunction.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParamProperties.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParamProperties.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParameters.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParameters.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersProperties.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersProperties.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolResource.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolResource.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.HTTPToolResourceType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesAssistantRequirement.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesAssistantRequirement.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinition.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinition.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinitionType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineRequirement.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineRequirement.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPDefinition.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPDefinition.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPDefinitionHeaders.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPDefinitionHeaders.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPDiscoveryResponse.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPDiscoveryResponse.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPTool.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPTool.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPToolInputSchema.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPToolInputSchema.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPToolResource.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPToolResource.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPToolResourceHeaders.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPToolResourceHeaders.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MCPToolResourceType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MaestroRunError.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MaestroRunError.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.MaestroRunResult.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequest.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequest.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequestResponseLanguage.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.RunAssistantRequest.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.RunAssistantRequest.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.RunAssistantRequestOutputType.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.RunAssistantRequestOutputType.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.RunAssistantRequestResponseLanguage.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.RunOptimization.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.ToolResource.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.ToolResource.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.Visibility.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.WebSearchToolResource.Json.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.WebSearchToolResource.g.cs
is excluded by!**/generated/**
src/libs/AI21/Generated/AI21.Models.WebSearchToolResourceType.g.cs
is excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/AI21/openapi.yaml
(23 hunks)
🔇 Additional comments (19)
src/libs/AI21/openapi.yaml (19)
1521-1541
: Create Assistant endpoint: OK.
OperationId, request/response wiring are consistent.
1590-1617
: Modify Assistant endpoint: OK.
Parameters, body, and response types are coherent.
1619-1647
: Run Assistant endpoint: OK.
Operation wiring to MaestroRunResult is correct.
1947-1969
: MCP discovery endpoint: OK.
Matches new MCP schemas.
2242-2247
: AssistantType enum added: OK.
Values look reasonable.
2305-2307
: Add vector_store_id to compliance upload: OK.
Field is well-described.
2344-2349
: BudgetLevel enum: OK.
Lowercase values with sensible defaults elsewhere.
2723-2756
: ConversationalRagConfig tweaks: OK.
Retrieval strategy default, max_documents, and response_language=unset look good.
2898-2957
: CreateMaestroRunsPayload tool/response_language updates: OK.
Uses ToolDefinition union and DRY response_language.
3307-3362
: FileSearchToolResource: OK.
Fields and enums align with retrieval configs.
3487-3495
: HTTPValidationError retained: OK.
Still referenced by 422 responses consistently.
3719-3745
: MCPToolResource: OK.
Discriminator type and fields look consistent.
3753-3791
: MaestroRunError and error on result: OK.
Clear error surface without breaking existing fields.
4118-4166
: RunAssistantRequest: OK.
Defaults and include list look fine.
4168-4172
: RunOptimization enum: OK.
Enum matches intended values.
4348-4355
: ToolResource: OK.
Matches new File/Web search tool resources.
4472-4476
: Visibility enum: OK.
Used on Assistant and recommended for CreateAssistantRequest.
4638-4698
: New Requirement/ToolDefinition unions: OK.
Discriminator mappings and type enums are correct.
2830-2873
: Consistency sweep (tools/resources/visibility) — use ToolResource & add visibility on create
- Replace inline tool_resources (type: object) with the ToolResource schema reference for Assistant, CreateAssistantRequest, and ModifyAssistantRequest (src/libs/AI21/openapi.yaml — CreateAssistantRequest ≈2829; ModifyAssistantRequest ≈3906; Assistant ≈2132–2166).
- Expose a visibility field on CreateAssistantRequest with the same type/enum as ModifyAssistantRequest to avoid asymmetric create/patch behavior.
title: CreateAssistantRequest | ||
required: | ||
- name | ||
type: object | ||
properties: | ||
name: | ||
title: Name | ||
type: string | ||
description: | ||
title: Description | ||
type: string | ||
optimization: | ||
title: Optimization | ||
type: string | ||
avatar: | ||
title: Avatar | ||
type: string | ||
models: | ||
title: Models | ||
type: array | ||
items: | ||
type: string | ||
tools: | ||
title: Tools | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/language_studio_api_server__data_types__execution_engine__ToolDefinition' | ||
tool_resources: | ||
title: Tool Resources | ||
type: object | ||
requirements: | ||
title: Requirements | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/language_studio_api_server__data_types__assistant__Requirement' | ||
budget: | ||
allOf: | ||
- $ref: '#/components/schemas/BudgetLevel' | ||
default: medium | ||
assistant_type: | ||
allOf: | ||
- $ref: '#/components/schemas/AssistantType' | ||
default: default | ||
CreateMaestroRunsPayload: |
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.
CreateAssistantRequest: make optimization enum, and reuse ToolResource.
- optimization is string here but RunOptimization elsewhere (ModifyAssistantRequest). Unify.
- tool_resources is plain object; align to ToolResource.
- Optional: allow visibility at creation (exists on ModifyAssistantRequest).
CreateAssistantRequest:
title: CreateAssistantRequest
required:
- name
type: object
properties:
...
- optimization:
- title: Optimization
- type: string
+ optimization:
+ $ref: '#/components/schemas/RunOptimization'
...
- tool_resources:
- title: Tool Resources
- type: object
+ tool_resources:
+ $ref: '#/components/schemas/ToolResource'
+ visibility:
+ $ref: '#/components/schemas/Visibility'
📝 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.
title: CreateAssistantRequest | |
required: | |
- name | |
type: object | |
properties: | |
name: | |
title: Name | |
type: string | |
description: | |
title: Description | |
type: string | |
optimization: | |
title: Optimization | |
type: string | |
avatar: | |
title: Avatar | |
type: string | |
models: | |
title: Models | |
type: array | |
items: | |
type: string | |
tools: | |
title: Tools | |
type: array | |
items: | |
$ref: '#/components/schemas/language_studio_api_server__data_types__execution_engine__ToolDefinition' | |
tool_resources: | |
title: Tool Resources | |
type: object | |
requirements: | |
title: Requirements | |
type: array | |
items: | |
$ref: '#/components/schemas/language_studio_api_server__data_types__assistant__Requirement' | |
budget: | |
allOf: | |
- $ref: '#/components/schemas/BudgetLevel' | |
default: medium | |
assistant_type: | |
allOf: | |
- $ref: '#/components/schemas/AssistantType' | |
default: default | |
CreateMaestroRunsPayload: | |
title: CreateAssistantRequest | |
required: | |
- name | |
type: object | |
properties: | |
name: | |
title: Name | |
type: string | |
description: | |
title: Description | |
type: string | |
optimization: | |
$ref: '#/components/schemas/RunOptimization' | |
avatar: | |
title: Avatar | |
type: string | |
models: | |
title: Models | |
type: array | |
items: | |
type: string | |
tools: | |
title: Tools | |
type: array | |
items: | |
$ref: '#/components/schemas/language_studio_api_server__data_types__execution_engine__ToolDefinition' | |
tool_resources: | |
$ref: '#/components/schemas/ToolResource' | |
visibility: | |
$ref: '#/components/schemas/Visibility' | |
requirements: | |
title: Requirements | |
type: array | |
items: | |
$ref: '#/components/schemas/language_studio_api_server__data_types__assistant__Requirement' | |
budget: | |
allOf: | |
- $ref: '#/components/schemas/BudgetLevel' | |
default: medium | |
assistant_type: | |
allOf: | |
- $ref: '#/components/schemas/AssistantType' | |
default: default | |
CreateMaestroRunsPayload: |
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 2830 to 2873, the
CreateAssistantRequest schema uses a plain string for optimization and a generic
object for tool_resources and is missing visibility; change optimization to
reuse the existing RunOptimization enum (replace type:string with an allOf/$ref
to the RunOptimization schema or direct $ref), change tool_resources to
reference the existing ToolResource schema instead of type: object, and add an
optional visibility property matching the ModifyAssistantRequest (same
type/default) so creation and modification schemas are consistent.
title: IgnestionBatchStatusCount | ||
required: | ||
- status | ||
- count | ||
type: object |
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.
🧩 Analysis chain
Repo-wide verification for the ingestion typo.
Ensure no lingering “Ignestion”.
Also applies to: 3528-3529
🏁 Script executed:
#!/bin/bash
rg -n 'Ignestion'
Length of output: 3442
Rename schema and generated types: replace "Ignestion" → "Ingestion"
Rename the schema key/title in src/libs/AI21/openapi.yaml and re-run the code generator so generated code no longer contains the typo.
Locations:
- src/libs/AI21/openapi.yaml:3495-3496 (IgnestionBatchStatusCount), 3528 ($ref).
- src/libs/AI21/Generated/AI21.Models.IgnestionBatchStatusCount.Json.g.cs: lines 5,37,43,54,58,66,72,73,83,87.
- src/libs/AI21/Generated/AI21.Models.IgnestionBatchStatusCount.g.cs: lines 9,32,39,48,50.
- src/libs/AI21/Generated/AI21.Models.IngestionBatchStatusResponse.g.cs: lines 30,56 (references IgnestionBatchStatusCount).
- src/libs/AI21/Generated/AI21.JsonSerializerContextTypes.g.cs: lines 665,673 (Type159/Type161).
Fix openapi.yaml (schema name/title and $ref) and then regenerate the files under src/libs/AI21/Generated/. If you cannot run the generator, update generated types and all references consistently.
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3495-3500, rename the schema
key/title "IgnestionBatchStatusCount" to "IngestionBatchStatusCount" and update
the corresponding $ref at ~line 3528 to point to the new name; then re-run the
OpenAPI code generator to regenerate everything under src/libs/AI21/Generated/.
If you cannot run the generator, manually update all generated artifacts to
match the new name: rename files and types from IgnestionBatchStatusCount →
IngestionBatchStatusCount, update all references in the listed generated files
(AI21.Models.IgnestionBatchStatusCount.Json.g.cs,
AI21.Models.IgnestionBatchStatusCount.g.cs,
AI21.Models.IngestionBatchStatusResponse.g.cs,
AI21.JsonSerializerContextTypes.g.cs) and ensure JSON serializer context Type
entries and any $ref strings are consistently renamed.
Typo: IgnestionBatchStatusCount → IngestionBatchStatusCount (breaks $refs).
This typo will break schema references.
Apply:
- IgnestionBatchStatusCount:
+ IngestionBatchStatusCount:
title: IgnestionBatchStatusCount
required:
- status
- count
And update all $refs accordingly (see Line 3528).
📝 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.
title: IgnestionBatchStatusCount | |
required: | |
- status | |
- count | |
type: object | |
IngestionBatchStatusCount: | |
title: IgnestionBatchStatusCount | |
required: | |
- status | |
- count | |
type: object |
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3496 to 3500, the schema name has a
typo "IgnestionBatchStatusCount" which should be "IngestionBatchStatusCount";
rename the schema key to the correct spelling and then update all $ref
occurrences that point to the misspelled name (including the one at/near line
3528) to use "#/components/schemas/IngestionBatchStatusCount" so references
resolve correctly.
Summary by CodeRabbit
New Features
Enhancements
API Changes