Skip to content

feat:Add assistant and MCP endpoints; refactor tools; schema updates#168

Closed
HavenDV wants to merge 1 commit into
mainfrom
bot/update-openapi_202509150340
Closed

feat:Add assistant and MCP endpoints; refactor tools; schema updates#168
HavenDV wants to merge 1 commit into
mainfrom
bot/update-openapi_202509150340

Conversation

@HavenDV

@HavenDV HavenDV commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Create and update assistants via new management APIs, including support for budgets and visibility settings.
    • Discover and integrate external tools through MCP discovery.
    • Fetch specific vector stores and route compliance/RFI processing to a chosen vector store.
    • Richer tool integrations with file search and web search resources, plus HTTP-based tools.
    • Improved conversational retrieval with configurable max documents.
    • Multi-type tool support for more flexible assistant configurations.

@coderabbitai

coderabbitai Bot commented Sep 15, 2025

Copy link
Copy Markdown

Walkthrough

Extends the OpenAPI spec by adding assistant management and MCP discovery endpoints, introducing new schemas and enums, refactoring tool resources to a multi-type model, replacing a monolithic Requirement schema with context-specific variants, updating retrieval configs, and adding vector_store_id fields to relevant request bodies.

Changes

Cohort / File(s) Summary
Assistant management endpoints
src/libs/AI21/openapi.yaml
Adds POST /studio/v1/assistants and PATCH /studio/v1/assistants/{assistant_id} with CreateAssistantRequest and ModifyAssistantRequest; responses return Assistant; 422 validation errors defined.
Vector store fetch endpoint
src/libs/AI21/openapi.yaml
Adds GET /studio/v1/demos/regulations/vector-store/{vector_store_id} to retrieve a vector store by ID.
MCP tooling and discovery
src/libs/AI21/openapi.yaml
Adds POST /studio/v1/mcp/discover; introduces MCPDefinition, MCPDiscoveryResponse, MCPTool, MCPToolResource schemas.
Tool resource refactor
src/libs/AI21/openapi.yaml
Renames ToolResources to ToolResource; adds FileSearchToolResource and WebSearchToolResource; updates schema references accordingly.
Maestro tools multi-type support
src/libs/AI21/openapi.yaml
Updates MaestroRunsPayload.tools to oneOf HTTPToolResource, MCPToolResource, FileSearchToolResource, WebSearchToolResource with discriminator.
Requirements schema split
src/libs/AI21/openapi.yaml
Removes generic Requirement; adds language_studio_api_server__data_types__assistant__Requirement and ...execution_engine__Requirement; wires into Assistant and related entities.
Assistant fields update
src/libs/AI21/openapi.yaml
Adds Assistant.requirements, budget, visibility; introduces enums BudgetLevel (low, medium, high) and Visibility (public, private).
Retrieval and RAG config
src/libs/AI21/openapi.yaml
ConversationalRagConfig.retrieval_strategy now references RetrievalStrategy via allOf; adds max_documents.
Vector-store routing in requests
src/libs/AI21/openapi.yaml
Adds vector_store_id to Body_upload_check_compliance and Body_process_rfi_document.
HTTP tool schemas
src/libs/AI21/openapi.yaml
Introduces HTTPToolEndpoint, HTTPToolFunction, HTTPToolFunctionParamProperties, HTTPToolFunctionParameters, HTTPToolResource.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant Assist as Assistant Service
  Note over Client,Assist: Create Assistant
  Client->>API: POST /studio/v1/assistants (CreateAssistantRequest)
  API->>Assist: Validate + create Assistant
  Assist-->>API: Assistant
  API-->>Client: 201 Assistant or 422 ValidationError
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant Assist as Assistant Service
  Note over Client,Assist: Modify Assistant
  Client->>API: PATCH /studio/v1/assistants/{assistant_id} (ModifyAssistantRequest)
  API->>Assist: Apply updates
  Assist-->>API: Assistant
  API-->>Client: 200 Assistant or 422 ValidationError
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant MCP as MCP Discovery
  Note over Client,MCP: MCP Tool Discovery
  Client->>API: POST /studio/v1/mcp/discover (MCPDefinition)
  API->>MCP: Discover tools/resources
  MCP-->>API: MCPDiscoveryResponse
  API-->>Client: 200 MCPDiscoveryResponse or 422 ValidationError
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant Vec as Vector Store
  Note over Client,Vec: Fetch Vector Store
  Client->>API: GET /studio/v1/demos/regulations/vector-store/{id}
  API->>Vec: Lookup by id
  Vec-->>API: VectorStore
  API-->>Client: 200 VectorStore
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant Proc as Processing Service
  participant VS as Vector Store
  Note over Client,VS: Processing with vector_store_id
  Client->>API: POST upload_check_compliance/process_rfi_document (… vector_store_id)
  API->>Proc: Start processing (with vector_store_id)
  Proc->>VS: Read/Write embeddings & docs
  Proc-->>API: Result
  API-->>Client: 200 Result
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

Poem

A rabbit taps its tiny paw,
New routes emerge—no time to yaw!
Assistants born, requirements split,
MCP tools now neatly fit.
Vectors hum, retrieval sings,
One YAML scroll with many things.
Hop! Ship! On whiskered wings. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The provided title "feat:@coderabbitai" is non‑descriptive and does not summarize the PR’s primary changes (new assistant CRUD endpoints, MCP tool discovery, ToolResource refactor, and vector‑store integrations), so it meets the guideline for a vague/generic title and is inconclusive. Rename the PR to a concise, descriptive title that highlights the main change, for example: "feat(studio): add assistant management, MCP tool discovery, and vector-store support" or "feat: add /studio/v1/assistants endpoints and MCP tool discovery with ToolResource refactor".
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bot/update-openapi_202509150340

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot enabled auto-merge September 15, 2025 03:40
@coderabbitai coderabbitai Bot changed the title feat:@coderabbitai feat:Add assistant and MCP endpoints; refactor tools; schema updates Sep 15, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (9)
src/libs/AI21/openapi.yaml (9)

1520-1541: Use 201 Created and add auth errors for POST /assistants.

Creation should return 201; also include 401/403. Keeps semantics and client expectations clear.

Apply:

   responses:
-        '200':
+        '201':
           description: Successful Response
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/Assistant'
+        '401':
+          description: Unauthorized
+        '403':
+          description: Forbidden
         '422':
           description: Validation Error

2239-2244: vector_store_id fields: add uuid format.

Likely a uuid; add format constraints for better validation.

         vector_store_id:
           title: Vector Store Id
           type: string
+          format: uuid

Also applies to: 2259-2262


2677-2710: ConversationalRagConfig: add min for max_documents, keep enum default.

Good move to allOf on RetrievalStrategy. Add minimum: 1 to max_documents to avoid 0/negatives.

         max_documents:
           title: Max Documents
           type: integer
+          minimum: 1

3270-3332: FileSearchToolResource: add uuid format + bounds.

  • file_ids likely uuids.
  • Add bounds for thresholds and alphas.
         file_ids:
           title: File Ids
           type: array
           items:
-            type: string
+            type: string
+            format: uuid
         retrieval_similarity_threshold:
           title: Retrieval Similarity Threshold
           type: number
-          default: 0
+          minimum: 0.0
+          maximum: 1.0
+          default: 0.0
         hybrid_search_alpha:
           title: Hybrid Search Alpha
           type: number
-          default: 1
+          minimum: 0.0
+          maximum: 1.0
+          default: 1.0

4388-4405: WebSearchToolResource: consider url format and clarify fallback semantics.

  • urls: string items should set format: uri.
  • Add a short description for fallback_to_web.
         urls:
           title: Urls
           type: array
           items:
-            type: string
+            type: string
+            format: uri
         fallback_to_web:
           title: Fallback To Web
           type: boolean
+          description: If true, perform general web search when provided urls yield no results.

3371-3382: HTTPToolEndpoint.headers: constrain values to strings.

OpenAPI “object” without value schema is too loose.

       properties:
         headers:
           title: Headers
-          type: object
+          type: object
+          additionalProperties:
+            type: string

3412-3437: HTTPToolFunctionParameters: “additionalProperties” should be schema-level, not a data field.

Right now it’s modeled as a user field. If intention is to express JSON Schema metadata, move it outside “properties”; otherwise rename to avoid confusion.

Two options:

  • Schema metadata (preferred):
     HTTPToolFunctionParameters:
       type: object
-      properties:
+      additionalProperties: false
+      properties:
         type:
           enum: [object]
           default: object
         properties:
           type: object
           additionalProperties:
             $ref: '#/components/schemas/HTTPToolFunctionParamProperties'
         required:
           type: array
           items: { type: string }
-        additionalProperties:
-          title: Additionalproperties
-          type: boolean
-          default: false
  • Or keep as data but rename:
-        additionalProperties:
+        allow_additional_properties:
           title: Additionalproperties
           type: boolean
           default: false

3643-3657: MCPDefinition/Resource: add uri formats and headers typing.

server_url should be uri; headers should constrain values.

     MCPDefinition:
       properties:
         server_url:
           type: string
+          format: uri
         headers:
-          type: object
+          type: object
+          additionalProperties:
+            type: string

     MCPToolResource:
       properties:
         server_url:
           type: string
+          format: uri
         headers:
-          type: object
+          type: object
+          additionalProperties:
+            type: string

Also applies to: 3688-3713


1917-1939: /mcp/discover: add auth errors and 4xx for invalid server.

Add 401/403 and a 424/502/504 if discovery depends on external MCP server availability.

   responses:
     '200':
       description: Successful Response
       content:
         application/json:
           schema:
             $ref: '#/components/schemas/MCPDiscoveryResponse'
+    '401':
+      description: Unauthorized
+    '403':
+      description: Forbidden
+    '424':
+      description: Failed Dependency (MCP server not reachable)
     '422':
       description: Validation Error
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3376f54 and 6dea513.

⛔ Files ignored due to path filters (111)
  • 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.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.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.CreateMaestroRunsPayloadToolDiscriminatorType.g.cs is excluded by !**/generated/**
  • src/libs/AI21/Generated/AI21.JsonConverters.CreateMaestroRunsPayloadToolDiscriminatorTypeNullable.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.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.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.ToolsItem.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.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.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.CreateAssistantRequestTool.Json.g.cs is excluded by !**/generated/**
  • src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestTool.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.CreateMaestroRunsPayloadToolDiscriminator.Json.g.cs is excluded by !**/generated/**
  • src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadToolDiscriminator.g.cs is excluded by !**/generated/**
  • src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadToolDiscriminatorType.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.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.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.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.ModifyAssistantRequestTool.Json.g.cs is excluded by !**/generated/**
  • src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequestTool.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.ToolsItem.Json.g.cs is excluded by !**/generated/**
  • src/libs/AI21/Generated/AI21.Models.ToolsItem.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 (20 hunks)
🔇 Additional comments (9)
src/libs/AI21/openapi.yaml (9)

1589-1617: PATCH /assistants: align request schema and expand error surface.

Looks fine. Recommend adding 401/403/404 to document common failures (unauthenticated, forbidden, not found).

Apply:

   responses:
         '200':
           description: Successful Response
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/Assistant'
+        '401':
+          description: Unauthorized
+        '403':
+          description: Forbidden
+        '404':
+          description: Not Found
         '422':
           description: Validation Error

2106-2119: Assistant.requirements/budget/visibility: LGTM; defaults consistent.

Defaults use new enums; no blockers.


2850-2862: Maestro tools discriminator: solid. Ensure “type” is required in all variants.

All variants include type with enum+default; mark “type” required to strengthen discrimination.

If generation allows, add “required: [type]” to each of HTTPToolResource, MCPToolResource, FileSearchToolResource, WebSearchToolResource.


2863-2864: tool_resources: good rename to ToolResource.

Consistent with multi-type resources. No issues.

Also applies to: 4258-4265


3658-3670: MCP discovery shapes: LGTM.

Names and required fields look good; no blocking issues.

Also applies to: 3672-3687


3865-3905: ModifyAssistantRequest: strong typing is consistent.

Good use of RunOptimization/BudgetLevel/Visibility here.


4382-4387: Visibility enum: LGTM.

Matches usage and defaults.


4548-4564: Split Requirement types: good separation; consider adding ids/formats.

Assistant variant includes id; execution_engine lacks id; confirm that’s intentional. If ids are uuids, add format.

Suggested (only if applicable):

 language_studio_api_server__data_types__assistant__Requirement:
   properties:
     id:
-      type: string
+      type: string
+      format: uuid

Also applies to: 4565-4580


2917-2920: response_language “unset” default: consistent across schemas.

Good addition; ensure clients document this value.

Also applies to: 2707-2710

Comment on lines +1018 to +1043
'/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
responses:
'200':
description: Successful Response
content:
application/json:
schema:
title: Response Get Vector Store Studio V1 Demos Regulations Vector Store Vector Store Id Get
type: object
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Vector store GET: add uuid format + 404 and a typed schema.

The path parameter should be uuid; response type should reference a concrete schema; add 404.

       parameters:
         - name: vector_store_id
           in: path
           required: true
           schema:
             title: Vector Store Id
-            type: string
+            type: string
+            format: uuid
       responses:
-        '200':
+        '200':
           description: Successful Response
           content:
             application/json:
               schema:
-                title: Response Get Vector Store Studio V1 Demos Regulations Vector Store  Vector Store Id  Get
-                type: object
+                $ref: '#/components/schemas/VectorStore'
+        '404':
+          description: Not Found
         '422':
           description: Validation Error

And add the schema:

 components:
   schemas:
+    VectorStore:
+      title: VectorStore
+      type: object
+      properties:
+        id:
+          type: string
+          format: uuid
+        name:
+          type: string
+        created_at:
+          type: string
+          format: date-time
+        metadata:
+          type: object
📝 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.

Suggested change
'/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
responses:
'200':
description: Successful Response
content:
application/json:
schema:
title: Response Get Vector Store Studio V1 Demos Regulations Vector Store Vector Store Id Get
type: object
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'/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
format: uuid
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/VectorStore'
'404':
description: Not Found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
VectorStore:
title: VectorStore
type: object
properties:
id:
type: string
format: uuid
name:
type: string
created_at:
type: string
format: date-time
metadata:
type: object
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 1018 to 1043, the GET vector-store
endpoint is missing a uuid format on the path parameter, lacks a 404 response,
and the 200 response uses an inline generic object instead of a concrete schema;
update the parameter schema to include format: uuid, change the 200 response to
reference a new components/schemas/VectorStore (or similarly named) schema, add
a 404 response with a suitable error schema reference (e.g., HTTPNotFound or
ProblemDetails), and add the VectorStore schema under components/schemas
defining the expected typed properties for a vector store (id: string, name:
string, created_at, etc.) to match the API contract.

Comment on lines +2298 to +2303
title: BudgetLevel
enum:
- low
- medium
- high
description: An enumeration.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Normalize Budget enum usage and defaults.

BudgetLevel is lower-case (low|medium|high), but Body_process_rfi_document/Body_upload_check_compliance use uppercase string defaults and free-form string types. Reference the enum and default to “medium”.

-    Body_process_rfi_document_studio_v1_demos_rfi_process_rfi_post:
+    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:
+    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: 2235-2240, 2259-2262

🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 2298-2303 (also apply same fixes at
2235-2240 and 2259-2262): the BudgetLevel enum is defined with lowercase values
(low|medium|high) but referenced schemas use free-form strings and uppercase
defaults; update those schemas (Body_process_rfi_document and
Body_upload_check_compliance) to reference the BudgetLevel enum via $ref (or use
enum: [low, medium, high]) and set the default to "medium" (lowercase),
replacing any uppercase default values and removing loose string types so they
validate against the enum.

Comment on lines +2784 to 2825
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:
type: object
additionalProperties:
$ref: '#/components/schemas/AssistantTool'
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
CreateMaestroRunsPayload:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

CreateAssistantRequest: fix type mismatches for optimization and tool_resources.

  • optimization is string here but RunOptimization elsewhere.
  • tool_resources is a raw object here but Assistant/Modify use AssistantToolResource.
   properties:
     optimization:
-      title: Optimization
-      type: string
+      $ref: '#/components/schemas/RunOptimization'
     tool_resources:
-      title: Tool Resources
-      type: object
+      $ref: '#/components/schemas/AssistantToolResource'
📝 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.

Suggested change
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:
type: object
additionalProperties:
$ref: '#/components/schemas/AssistantTool'
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
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:
type: object
additionalProperties:
$ref: '#/components/schemas/AssistantTool'
tool_resources:
$ref: '#/components/schemas/AssistantToolResource'
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
CreateMaestroRunsPayload:
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 2784 to 2825, the
CreateAssistantRequest schema has type mismatches: change the optimization
property from type: string to reference the existing RunOptimization schema (use
$ref: '#/components/schemas/RunOptimization' or the correct path to the
RunOptimization schema), and change tool_resources from a generic object to
reference the AssistantToolResource schema used elsewhere (e.g. replace type:
object with $ref: '#/components/schemas/AssistantToolResource'); keep other
properties as-is.

@HavenDV HavenDV closed this Mar 10, 2026
auto-merge was automatically disabled March 10, 2026 22:18

Pull request was closed

@HavenDV HavenDV deleted the bot/update-openapi_202509150340 branch March 21, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant