-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat:Expand OpenAPI: assistant lifecycle, vector-store, MCP endpoints #204
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
WalkthroughExpands the OpenAPI spec with new endpoints for vector-store retrieval, assistant lifecycle (create/modify/run), and MCP discovery. Replaces the prior ToolDefinition with a discriminated union and updates Assistant schemas. Adds HTTP/MCP/FileSearch/WebSearch tool resources, new enums/types, and integrates vector_store_id and BudgetLevel in relevant payloads. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant API as Studio API
participant Assist as Assistant Service
participant Maestro as Maestro Runner
participant Tools as Tooling (HTTP/MCP/File/Web)
rect rgb(235, 245, 255)
note over Client,API: Assistant creation/modification
Client->>API: POST /studio/v1/assistants (CreateAssistantRequest)
API->>Assist: Create assistant (models, tools, resources, settings)
Assist-->>API: Assistant
Client->>API: PATCH /studio/v1/assistants/{id} (ModifyAssistantRequest)
API->>Assist: Update assistant
Assist-->>API: Assistant
end
rect rgb(245, 235, 255)
note over Client,API: Run assistant
Client->>API: POST /studio/v1/assistants/{id}/run (RunAssistantRequest)
API->>Maestro: Start run (input, options)
Maestro->>Tools: Invoke tool(s) as needed (discriminated union)
Tools-->>Maestro: Tool results/errors
Maestro-->>API: MaestroRunResult (may include error)
API-->>Client: 200 MaestroRunResult | 422 Validation
end
sequenceDiagram
autonumber
participant Client
participant API as Studio API
participant MCP as MCP Server
rect rgb(240, 255, 240)
note over Client,API: MCP tool discovery
Client->>API: POST /studio/v1/mcp/discover (MCPDefinition)
API->>MCP: Connect using server_url/headers
MCP-->>API: Tools metadata
API-->>Client: MCPDiscoveryResponse (definition, tools)
end
sequenceDiagram
autonumber
participant Client
participant API as Studio API
participant VS as Vector Store
note over Client,API: Vector-store retrieval
Client->>API: GET /studio/v1/demos/regulations/vector-store/{vector_store_id}
API->>VS: Fetch store by ID
VS-->>API: Store data
API-->>Client: 200 object | 422 Validation
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ 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
♻️ Duplicate comments (1)
src/libs/AI21/openapi.yaml (1)
3907-3960
: Create vs Modify Assistant: optimization type inconsistency.Modify uses RunOptimization (enum) but Create uses string. Align Create to enum (see earlier diff).
🧹 Nitpick comments (9)
src/libs/AI21/openapi.yaml (9)
1018-1043
: Add 404 and tighten path param format for Vector Store GET.
- Add a 404 response for unknown vector_store_id.
- Set path param format to uuid if applicable.
- Optional: clean up the autogenerated 200 schema title.
'/studio/v1/demos/regulations/vector-store/{vector_store_id}': get: summary: Get Vector Store description: Get a vector store by ID. operationId: get_vector_store_studio_v1_demos_regulations_vector_store__vector_store_id__get parameters: - name: vector_store_id in: path required: true schema: title: Vector Store Id - type: string + type: string + format: uuid responses: '200': description: Successful Response content: application/json: schema: - title: Response Get Vector Store Studio V1 Demos Regulations Vector Store Vector Store Id Get + title: Vector Store type: object + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' '422': description: Validation Error
1618-1647
: Run Assistant: consider async semantics.If runs are long-lived, consider 202 Accepted with polling via /maestro/runs/{execution_id}. Otherwise OK.
1947-1969
: MCP endpoint naming/style nit.Capitalize MCP consistently in summary (“MCP Tool Discovery”).
2132-2166
: Assistant schema: unify tool_resources typing and defaults.
- tools now use the new union (good).
- tool_resources points to AssistantToolResource, while Maestro payloads use ToolResource. Pick one and standardize (prefer ToolResource with explicit shapes).
- Double-check default visibility=public is desired.
- tool_resources: - $ref: '#/components/schemas/AssistantToolResource' + tool_resources: + $ref: '#/components/schemas/ToolResource'
2304-2307
: Wrong description: references “RFI processing” in Regulations payload.Change to “compliance processing”.
vector_store_id: title: Vector Store Id type: string - description: Vector store ID to use for RFI processing + description: Vector store ID to use for compliance processing
2723-2756
: ConversationalRagConfig: add validation bounds.Add min/max for retrieval_similarity_threshold (0..1) and max_documents (>=1) for parity with LibrarySearchRequest.
retrieval_similarity_threshold: title: Retrieval Similarity Threshold - type: number + type: number + minimum: 0.0 + maximum: 1.0 max_documents: title: Max Documents type: integer + minimum: 1
3307-3362
: FileSearchToolResource: add constraints and docs parity.
- retrieval_similarity_threshold should be 0..1.
- max_neighbors/min bounds if applicable.
retrieval_similarity_threshold: title: Retrieval Similarity Threshold - type: number + type: number + minimum: 0.0 + maximum: 1.0 max_neighbors: title: Max Neighbors type: integer + minimum: 1
3496-3529
: Typo: “IgnestionBatchStatusCount” → “IngestionBatchStatusCount”.Fix the schema name and the reference. Consider leaving a deprecated alias to avoid breaking generated clients.
- IgnestionBatchStatusCount: - title: IgnestionBatchStatusCount + IngestionBatchStatusCount: + title: IngestionBatchStatusCount required: - status - count type: object ... IngestionBatchStatusResponse: properties: statuses: title: Statuses type: array items: - $ref: '#/components/schemas/IgnestionBatchStatusCount' + $ref: '#/components/schemas/IngestionBatchStatusCount'Optional alias:
+ IgnestionBatchStatusCount: + allOf: + - $ref: '#/components/schemas/IngestionBatchStatusCount' + deprecated: true
4348-4355
: Duplicate “tool_resources” models.ToolResource (typed) vs AssistantToolResource (loose + plan_approval). Recommend consolidating on ToolResource and deprecating AssistantToolResource.
Also applies to: 2229-2241
📜 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 (8)
src/libs/AI21/openapi.yaml (8)
1589-1617
: Modify Assistant: LGTM.PATCH shape and response look consistent with Assistant. Ensure PATCH semantics (partial update) are upheld server-side.
3402-3486
: HTTP tool schemas: LGTM.Clear separation of endpoint/function/params with a discriminated union.
3674-3745
: MCP types: LGTM.Shapes for definition, discovery response, tool resource look consistent and usable.
3753-3760
: MaestroRunResult error channel: LGTM.Error object addition is backward-compatible and explicit.
Also applies to: 3790-3791
4118-4166
: RunAssistantRequest: LGTM.Defaults/read-only fields look sane; include list is explicit.
4472-4477
: Visibility/WebSearchToolResource: LGTM.Enums and resource shape are consistent with the new union.
Also applies to: 4478-4495
4638-4698
: ToolDefinition unions: LGTM.Discriminator mappings match the concrete resources. Good.
1-4703
: Action Required: Please manually verify OpenAPI spec consistency
- Confirm all
budget
defaults and enum values use the correct casing (low
/medium
/high
) consistently.- Ensure the
optimization
property inCreateAssistantRequest
andModifyAssistantRequest
share the same type/schema.- Validate every
tool_resources
reference points to a defined schema.- Correct the typo in
IgnestionBatchStatusCount
→IngestionBatchStatusCount
.- Review the
vector_store_id
description under the RFI compliance payload to match intended behavior.
post: | ||
summary: Create Assistant | ||
operationId: v1_create_assistant | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/CreateAssistantRequest' | ||
required: true | ||
responses: | ||
'200': | ||
description: Successful Response | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Assistant' | ||
'422': | ||
description: Validation Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/HTTPValidationError' |
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.
Create Assistant: align request typing and HTTP status.
- Use RunOptimization enum for optimization (currently string in CreateAssistantRequest).
- tool_resources should reference AssistantToolResource or ToolResource (not a bare object).
- Consider 201 Created for a creation endpoint.
/studio/v1/assistants:
post:
summary: Create Assistant
operationId: v1_create_assistant
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAssistantRequest'
required: true
responses:
- '200':
+ '201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Assistant'
📝 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.
post: | |
summary: Create Assistant | |
operationId: v1_create_assistant | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/CreateAssistantRequest' | |
required: true | |
responses: | |
'200': | |
description: Successful Response | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Assistant' | |
'422': | |
description: Validation Error | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/HTTPValidationError' | |
post: | |
summary: Create Assistant | |
operationId: v1_create_assistant | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/CreateAssistantRequest' | |
required: true | |
responses: | |
'201': | |
description: Successful Response | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Assistant' | |
'422': | |
description: Validation Error | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/HTTPValidationError' |
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 1520 to 1541, the Create Assistant
endpoint needs schema/type and status-code alignment: update
CreateAssistantRequest so the optimization field uses the existing
RunOptimization enum instead of a plain string; change the tool_resources
property to reference the proper schema (AssistantToolResource or ToolResource)
instead of an inline/empty object; and update the success response status from
'200' to '201' with the same Assistant schema. Ensure requestBody schema
references the corrected CreateAssistantRequest and that any examples/required
lists reflect these type changes.
title: BudgetLevel | ||
enum: | ||
- low | ||
- medium | ||
- high | ||
description: An enumeration. |
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.
Budget enum usage inconsistent (lowercase enum vs uppercase strings).
- BudgetLevel enum uses low/medium/high (lowercase).
- Body_process_rfi_document and Body_upload_check_compliance use uppercase strings and string type with defaults.
Unify to use BudgetLevel in both bodies.
Body_process_rfi_document_studio_v1_demos_rfi_process_rfi_post:
properties:
budget:
- title: Budget
- type: string
- description: 'Budget level: LOW, MEDIUM, or HIGH'
- default: MEDIUM
+ allOf:
+ - $ref: '#/components/schemas/BudgetLevel'
+ description: Budget level
+ default: medium
Body_upload_check_compliance_studio_v1_demos_regulations_upload_check_compliance_post:
properties:
budget:
- title: Budget
- type: string
- default: MEDIUM
+ allOf:
+ - $ref: '#/components/schemas/BudgetLevel'
+ default: medium
Also applies to: 2279-2286, 2296-2304
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 2344-2349 (and also at 2279-2286,
2296-2304), the BudgetLevel enum is defined with lowercase values
(low/medium/high) while Body_process_rfi_document and
Body_upload_check_compliance use uppercase string literals and plain string
types with defaults; update those request body schemas to reference the
BudgetLevel enum type instead of raw strings, adjust any defaults to match the
enum values (use lowercase), and remove duplicate inline enum/string definitions
so all usages consistently use the single BudgetLevel definition.
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: type mismatches vs ModifyAssistantRequest/Assistant.
- optimization should be RunOptimization (enum) like ModifyAssistantRequest.
- tool_resources should reference ToolResource (or AssistantToolResource) instead of raw object.
- If response_language/visibility are settable at creation, add them to parity with Assistant.
CreateAssistantRequest:
properties:
optimization:
- title: Optimization
- type: string
+ $ref: '#/components/schemas/RunOptimization'
tool_resources:
- title: Tool Resources
- type: object
+ $ref: '#/components/schemas/ToolResource'
+ visibility:
+ allOf:
+ - $ref: '#/components/schemas/Visibility'
+ default: public
+ response_language:
+ title: Response Language
+ enum: [arabic, dutch, english, french, german, hebrew, italian, portuguese, spanish, unset]
+ type: string
+ default: unset
📝 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: | |
allOf: | |
- $ref: '#/components/schemas/Visibility' | |
default: public | |
response_language: | |
title: Response Language | |
enum: [arabic, dutch, english, french, german, hebrew, italian, portuguese, spanish, unset] | |
type: string | |
default: unset | |
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: |
Summary by CodeRabbit