Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 21, 2025

Summary by CodeRabbit

  • New Features
    • Create, modify, and run assistants via new requests with support for budgeting, visibility, assistant type, and response language.
    • Add run optimization options (cost or latency) and richer run outputs.
    • Integrate MCP tool discovery and usage.
    • Support HTTP-based tools plus file and web search tool resources.
    • Fetch vector stores by ID through a new endpoint.
  • Improvements
    • Unified tool definitions across payloads for consistency.
    • Enhanced error reporting for runs with explicit error details.

@coderabbitai
Copy link

coderabbitai bot commented Sep 21, 2025

Walkthrough

The OpenAPI spec adds new endpoints for vector-store retrieval and MCP discovery, introduces assistant creation/modification/run payloads, expands Assistant fields, refactors tool definitions/resources (HTTP/MCP/File/Web), adds enums (BudgetLevel, AssistantType, Visibility, RunOptimization), updates Maestro run result with error, and consolidates references to namespaced ToolDefinition schemas.

Changes

Cohort / File(s) Summary
Endpoints
src/libs/AI21/openapi.yaml
Added GET /studio/v1/demos/regulations/vector-store/{vector_store_id}. Added POST /studio/v1/mcp/discover.
Assistant APIs
.../openapi.yaml
Added CreateAssistantRequest, ModifyAssistantRequest, RunAssistantRequest. Assistant schema extended with requirements, budget, visibility, assistant_type, response_language, and updated tool references.
MCP Integration
.../openapi.yaml
Added MCPDefinition, MCPDiscoveryResponse, MCPTool, MCPToolResource. New discovery flow payloads and responses.
Tooling Refactor
.../openapi.yaml
Replaced ToolResources with ToolResource. Introduced language_studio_api_server__data_types__execution_engine__ToolDefinition with discriminator by type. Added HTTPToolResource, HTTPToolEndpoint, HTTPToolFunction(+Parameters), FileSearchToolResource, WebSearchToolResource. Updated references across schemas.
Maestro Run Models
.../openapi.yaml
Added MaestroRunError; MaestroRunResult extended with optional error. Introduced RunOptimization enum.
Enums and Visibility
.../openapi.yaml
Added BudgetLevel (low, medium, high), AssistantType (default, chat, maestro), Visibility (public, private). Response language enums added to relevant requests.
Validation / Errors
.../openapi.yaml
Added HTTPValidationError and ValidationError structures.
Namespaced Data Types
.../openapi.yaml
Introduced namespaced assistant/chat/execution_engine Requirement and ToolDefinition schemas; replaced prior inline/generic definitions across references.
Vector Store
.../openapi.yaml
New path to fetch vector store by ID with 200 and 422 responses.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Client
  participant API as Studio API
  participant MCP as MCP Server

  rect rgb(240,248,255)
  note over Client,API: MCP tool discovery (new)
  Client->>API: POST /studio/v1/mcp/discover { MCPDefinition }
  API->>MCP: Connect using server_url, headers
  MCP-->>API: Tools list (name, description, inputSchema)
  API-->>Client: MCPDiscoveryResponse { mcp_definition, tools }
  end
Loading
sequenceDiagram
  autonumber
  participant Client
  participant API as Studio API
  participant Engine as Execution Engine
  participant Maestro as Maestro Runner
  participant DS as Data Sources

  rect rgb(245,255,245)
  note over Client,API: Assistant run (new payloads/fields)
  Client->>API: RunAssistantRequest { input, options, response_language }
  API->>Engine: Start run (tools, requirements, optimization)
  Engine->>DS: Fetch/search (file_search/web_search) as needed
  Engine->>Maestro: Execute plan (may fail)
  alt success
    Maestro-->>Engine: MaestroRunResult { output }
    Engine-->>API: Aggregated result
    API-->>Client: 200 OK { result, includes }
  else error
    Maestro-->>Engine: MaestroRunResult { error: MaestroRunError }
    Engine-->>API: Result with error
    API-->>Client: 200 OK { error in result }
  end
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Poem

I twitch my whiskers at schemas anew,
Tools learned to speak, with HTTP too.
Maestro may stumble, errors in tow—
Yet assistants march where vectors go.
MCP whispers, “discover my art,”
I hop through enums with a thumping heart.
Carrots for budgets; onward we start! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The provided title "feat:@coderabbitai" does not describe the changes in this PR: the changeset is a large OpenAPI/schema refactor that adds Assistant/MCP/tool-definition schemas and new endpoints (e.g., RunAssistantRequest, MCP discovery, vector-store retrieval), while the title is just a handle and provides no meaningful summary for reviewers or history. Please replace the title with a concise, descriptive one-sentence summary of the main change before merging. Suggested examples: "feat(openapi): add Assistant and MCP schemas, refactor tool definitions, and add RunAssistant endpoints" or "feat(openapi): introduce MCP discovery, RunAssistantRequest, and tool-resource 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_202509210338

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 21, 2025 03:39
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:OpenAPI: add vector-store/MCP endpoints, assistant payloads, enums Sep 21, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/libs/AI21/openapi.yaml (2)

2103-2105: Unify optimization type: use RunOptimization everywhere.

Assistant.optimization is a free string, while ModifyAssistantRequest.optimization is RunOptimization. Make Assistant.optimization also RunOptimization.

-        optimization:
-          title: Optimization
-          type: string
+        optimization:
+          allOf:
+            - $ref: '#/components/schemas/RunOptimization'

Additionally, align CreateAssistantRequest.optimization similarly (see below).

Also applies to: 3916-3918


2282-2286: Budget enum casing inconsistency (MEDIUM vs medium).

Body_* payloads default to uppercase MEDIUM while BudgetLevel enum is lowercase. This will confuse validators.

@@ Body_process_rfi_document_studio_v1_demos_rfi_process_rfi_post
-        budget:
-          title: Budget
-          type: string
-          description: 'Budget level: LOW, MEDIUM, or HIGH'
-          default: MEDIUM
+        budget:
+          allOf:
+            - $ref: '#/components/schemas/BudgetLevel'
+          description: Budget level
+          default: medium

@@ Body_upload_check_compliance_studio_v1_demos_regulations_upload_check_compliance_post
-        budget:
-          title: Budget
-          type: string
-          default: MEDIUM
+        budget:
+          allOf:
+            - $ref: '#/components/schemas/BudgetLevel'
+          default: medium

Also applies to: 2301-2304, 2344-2349

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

1520-1541: Use 201 Created with Location header for resource creation.

Creating an Assistant should return 201 and expose the URL of the new resource.

-      responses:
-        '200':
-          description: Successful Response
+      responses:
+        '201':
+          description: Created
+          headers:
+            Location:
+              description: URL of the created resource.
+              schema:
+                type: string
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/Assistant'

1619-1647: Consider async 202 for runs (in addition to 200).

Runs may start asynchronously. Returning 202 with an execution_id lets clients poll /studio/v1/maestro/runs/{execution_id}.

       responses:
         '200':
           description: Successful Response
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/MaestroRunResult'
+        '202':
+          description: Accepted
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/MaestroRunResult'

2305-2308: Fix misleading description for vector_store_id.

The compliance endpoint’s vector_store_id says “RFI 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 checking

3411-3412: Constrain HTTP headers map to string values.

Currently headers is an untyped object.

     HTTPToolEndpoint:
       title: HTTPToolEndpoint
       required:
         - url
       type: object
       properties:
         url:
           title: Url
           type: string
         headers:
           title: Headers
-          type: object
+          type: object
+          additionalProperties:
+            type: string

2830-2873: Allow response_language on create for parity with Assistant.

Assistant exposes response_language, but CreateAssistantRequest cannot set it.

     CreateAssistantRequest:
       title: CreateAssistantRequest
       required:
         - name
       type: object
       properties:
@@
         assistant_type:
           allOf:
             - $ref: '#/components/schemas/AssistantType'
           default: default
+        response_language:
+          title: Response Language
+          enum:
+            - arabic
+            - dutch
+            - english
+            - french
+            - german
+            - hebrew
+            - italian
+            - portuguese
+            - spanish
+            - unset
+          type: string
+          default: unset

Also align optimization here with RunOptimization:

-        optimization:
-          title: Optimization
-          type: string
+        optimization:
+          $ref: '#/components/schemas/RunOptimization'
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fed30ee and 3a55861.

⛔ 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 (1)
src/libs/AI21/openapi.yaml (1)

3715-3718: Keep camelCase "inputSchema" (MCP requires it).
MCP spec (2024-11-05) defines the tool field as "inputSchema" in camelCase; leave src/libs/AI21/openapi.yaml (lines 3715–3718) unchanged.

Likely an incorrect or invalid review comment.

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

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add 404, fix title, and type the path param as UUID.

The new vector-store endpoint should return 404 when the ID isn’t found; the title string has duplicate spaces; and vector_store_id looks like a UUID but lacks format.

Apply this diff:

   '/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: Response Get Vector Store Studio V1 Demos Regulations Vector Store Id Get
                 type: object
         '422':
           description: Validation Error
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/HTTPValidationError'
+        '404':
+          description: Not Found

Also consider introducing a concrete VectorStore schema and returning it here.

📝 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:
title: Response Get Vector Store Studio V1 Demos Regulations Vector Store Id Get
type: object
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'404':
description: Not Found
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 1018 to 1043, the GET vector-store
path needs three fixes: add a '404' response for not-found cases, correct the
duplicated spaces in the response schema title, and mark the path parameter
vector_store_id with format: uuid (type remains string) to reflect UUID usage;
additionally, change the 200 response schema to reference or define a concrete
VectorStore component schema (e.g., $ref: '#/components/schemas/VectorStore') so
the endpoint returns a typed object.

Comment on lines +2858 to +2860
title: Tool Resources
type: object
requirements:
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Normalize tool_resources type to ToolResource.

Four places use different shapes: Assistant uses AssistantToolResource, CreateAssistantRequest uses object, ModifyAssistantRequest uses AssistantToolResource, MaestroRun uses ToolResource. Pick ToolResource across the board and deprecate AssistantToolResource.

@@ CreateAssistantRequest
-        tool_resources:
-          title: Tool Resources
-          type: object
+        tool_resources:
+          $ref: '#/components/schemas/ToolResource'

@@ Assistant
-        tool_resources:
-          $ref: '#/components/schemas/AssistantToolResource'
+        tool_resources:
+          $ref: '#/components/schemas/ToolResource'

@@ ModifyAssistantRequest
-        tool_resources:
-          $ref: '#/components/schemas/AssistantToolResource'
+        tool_resources:
+          $ref: '#/components/schemas/ToolResource'

If keeping AssistantToolResource for compatibility, mark it deprecated:

   AssistantToolResource:
     title: AssistantToolResource
     type: object
+    deprecated: true

Also applies to: 2134-2134, 3936-3937, 2900-2901

Comment on lines +3443 to +3469
title: HTTPToolFunctionParameters
required:
- properties
- required
type: object
properties:
type:
title: Type
enum:
- object
type: string
default: object
properties:
title: Properties
type: object
additionalProperties:
$ref: '#/components/schemas/HTTPToolFunctionParamProperties'
required:
title: Required
type: array
items:
type: string
additionalProperties:
title: Additionalproperties
type: boolean
default: false
HTTPToolResource:
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix misuse of JSON Schema “additionalProperties”.

You modeled additionalProperties as a field inside the object. It must be a schema constraint at the same level as type/properties.

     HTTPToolFunctionParameters:
       title: HTTPToolFunctionParameters
       required:
         - properties
         - required
       type: object
+      additionalProperties: false
       properties:
         type:
           title: Type
           enum:
             - object
           type: string
           default: object
         properties:
           title: Properties
           type: object
           additionalProperties:
             $ref: '#/components/schemas/HTTPToolFunctionParamProperties'
         required:
           title: Required
           type: array
           items:
             type: string
-        additionalProperties:
-          title: Additionalproperties
-          type: boolean
-          default: false
📝 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: HTTPToolFunctionParameters
required:
- properties
- required
type: object
properties:
type:
title: Type
enum:
- object
type: string
default: object
properties:
title: Properties
type: object
additionalProperties:
$ref: '#/components/schemas/HTTPToolFunctionParamProperties'
required:
title: Required
type: array
items:
type: string
additionalProperties:
title: Additionalproperties
type: boolean
default: false
HTTPToolResource:
title: HTTPToolFunctionParameters
required:
- properties
- required
type: object
additionalProperties: false
properties:
type:
title: Type
enum:
- object
type: string
default: object
properties:
title: Properties
type: object
additionalProperties:
$ref: '#/components/schemas/HTTPToolFunctionParamProperties'
required:
title: Required
type: array
items:
type: string
HTTPToolResource:
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3443 to 3469, the schema incorrectly
defines additionalProperties as a regular property inside the object instead of
as a schema constraint; move the additionalProperties definition out of the
properties map to the same level as type/properties/required (so the
HTTPToolFunctionParameters schema has an additionalProperties: false or a schema
definition at root), remove the duplicate additionalProperties entry under
properties, and ensure the top-level additionalProperties is typed as a boolean
or a valid schema object per JSON Schema.

Comment on lines +3496 to 3500
title: IgnestionBatchStatusCount
required:
- status
- count
type: object
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Typo: “IgnestionBatchStatusCount” → “IngestionBatchStatusCount”.

Public schema name is misspelled and referenced downstream.

-    IgnestionBatchStatusCount:
+    IgnestionBatchStatusCount:
       title: IgnestionBatchStatusCount
       required:
         - status
         - count
+      deprecated: true
       type: object
@@ IngestionBatchStatusResponse.statuses.items
-            $ref: '#/components/schemas/IgnestionBatchStatusCount'
+            $ref: '#/components/schemas/IngestionBatchStatusCount'

Add the correctly spelled schema (new block):

# New schema (add under components/schemas)
IngestionBatchStatusCount:
  title: IngestionBatchStatusCount
  required:
    - status
    - count
  type: object
  properties:
    status:
      title: Status
      type: string
    count:
      title: Count
      type: integer

Also applies to: 3525-3529

🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3496-3500 (and similarly at
3525-3529) the public schema name is misspelled as "IgnestionBatchStatusCount";
create a correctly spelled schema block "IngestionBatchStatusCount" under
components/schemas with title, required status and count, type object, and
properties status (string) and count (integer), then replace or alias any
references to the misspelled "IgnestionBatchStatusCount" to point to
"IngestionBatchStatusCount" (or remove the misspelled block) so downstream refs
use the correct name.

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.

2 participants