Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 22, 2025

Summary by CodeRabbit

  • New Features

    • Public endpoints to create, modify, and run Assistants.
    • Run options: optimization (cost/latency), verbose, output type, includes, response language, dynamic planning, and structured RAG.
    • MCP Tool Discovery endpoint for dynamic tool integration.
    • Endpoint to fetch a vector store by ID.
  • Improvements

    • Enhanced tool/resource model, including HTTP/MCP tools.
    • Added budget level, visibility, and assistant type options.
    • Retrieval settings expanded (e.g., max documents).
    • Ability to supply vector_store_id in relevant upload/processing flows.
    • More consistent defaults and validation across requests and responses.

@coderabbitai
Copy link

coderabbitai bot commented Sep 22, 2025

Walkthrough

Expanded OpenAPI spec in a single file to add new endpoints (Assistants CRUD/run, MCP tool discovery, vector-store fetch), introduce and refactor public schemas (assistant, tools, MCP, HTTP tool types), augment existing request bodies with vector_store_id and run options, and update enums/configs and references to new language_studio_api_server__data_types__… definitions.

Changes

Cohort / File(s) Summary of changes
New Endpoints: Assistants
src/libs/AI21/openapi.yaml
Added POST /studio/v1/assistants (CreateAssistantRequest→Assistant), PATCH /studio/v1/assistants/{assistant_id} (ModifyAssistantRequest→Assistant), POST /studio/v1/assistants/{assistant_id}/run (RunAssistantRequest→MaestroRunResult).
New Endpoint: MCP Tool Discovery
src/libs/AI21/openapi.yaml
Added POST /studio/v1/mcp/discover accepting MCPDefinition, responding with MCPDiscoveryResponse.
New Endpoint: Vector Store Fetch
src/libs/AI21/openapi.yaml
Added GET /studio/v1/demos/regulations/vector-store/{vector_store_id} returning object payload; 422 HTTPValidationError.
Public Schemas: Assistants & Runs
src/libs/AI21/openapi.yaml
Introduced CreateAssistantRequest, ModifyAssistantRequest, RunAssistantRequest; enums AssistantType, BudgetLevel, Visibility; RunOptimization; MaestroRunError (wired into MaestroRunResult).
Public Schemas: MCP & HTTP Tools
src/libs/AI21/openapi.yaml
Added MCPDefinition, MCPDiscoveryResponse, MCPTool, MCPToolResource; HTTPToolEndpoint, HTTPToolFunction, HTTPToolFunctionParameters, HTTPToolResource; WebSearchToolResource, FileSearchToolResource.
Tool Definition Refactor
src/libs/AI21/openapi.yaml
Replaced AssistantTool and older ToolResources with language_studio_api_server__data_types__… ToolDefinition/Requirement schemas across references, including chat/execution_engine variants.
Payload Augmentations
src/libs/AI21/openapi.yaml
Added vector_store_id to compliance/RFI bodies; expanded RunAssistantRequest with input, verbose, output_type, include, structured_rag_enabled, dynamic_planning_enabled, response_language, optimization.
Enum/Config Updates
src/libs/AI21/openapi.yaml
Adjusted defaults (e.g., response_language includes unset, BudgetLevel defaults), extended retrieval settings (e.g., max_documents in ConversationalRagConfig).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant Assist as Assistants Service
  participant Exec as Execution Engine

  rect rgba(220,240,255,0.4)
    note over Client,API: Create Assistant
    Client->>API: POST /studio/v1/assistants (CreateAssistantRequest)
    API->>Assist: createAssistant(request)
    Assist-->>API: Assistant
    API-->>Client: 200 Assistant
  end

  rect rgba(235,255,235,0.4)
    note over Client,API: Modify Assistant
    Client->>API: PATCH /studio/v1/assistants/{id} (ModifyAssistantRequest)
    API->>Assist: modifyAssistant(id, patch)
    Assist-->>API: Assistant
    API-->>Client: 200 Assistant
  end

  rect rgba(255,245,220,0.5)
    note over Client,Exec: Run Assistant
    Client->>API: POST /studio/v1/assistants/{id}/run (RunAssistantRequest)
    API->>Exec: runAssistant(id, options, input)
    alt Success
      Exec-->>API: MaestroRunResult(result)
      API-->>Client: 200 MaestroRunResult
    else Error
      Exec-->>API: MaestroRunResult(error: MaestroRunError)
      API-->>Client: 200 MaestroRunResult
    end
  end
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant MCP as MCP Discovery

  rect rgba(240,240,255,0.5)
    note over Client,MCP: MCP Tool Discovery
    Client->>API: POST /studio/v1/mcp/discover (MCPDefinition)
    API->>MCP: discoverTools(definition)
    MCP-->>API: MCPDiscoveryResponse (tools, resources)
    API-->>Client: 200 MCPDiscoveryResponse
  end
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant Vec as Vector Store Service

  note over Client,Vec: Fetch Vector Store by ID
  Client->>API: GET /studio/v1/demos/regulations/vector-store/{vector_store_id}
  API->>Vec: getVectorStore(id)
  Vec-->>API: VectorStore Object
  API-->>Client: 200 Object
  opt Validation error
    API-->>Client: 422 HTTPValidationError
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45–75 minutes

Poem

Thump-thump, my paws tap fresh endpoints’ doors,
Assistants wake, with tools galore!
MCP maps the hidden warren’s lore,
Vectors fetched from storage’s core.
New schemas bloom like fields in spring—
I nose the specs, and hop, and sing. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The PR title "feat:@coderabbitai" is a short bot tag that does not describe the substantive changes in this changeset; the diff actually adds public Assistant APIs (create/modify/run), an MCP discovery endpoint, a vector-store fetch endpoint and many public-schema refactors, none of which are communicated by the title. Because the title is vague and non-descriptive it does not meet the requirement for a concise, clear summary of the primary change. Please update the PR title to a concise, specific summary of the main change (for example: "feat(studio): add assistants API, MCP discovery, and vector-store fetch" or "feat(openapi): expose Assistant create/modify/run, MCP discovery, and vector-store endpoint"); use conventional scope/prefix (feat/bugfix) and keep it short so reviewers can understand the primary change at a glance.
✅ 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_202509220339

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 22, 2025 03:40
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Expand OpenAPI: Assistants CRUD/run, MCP discovery, vector-store fetch Sep 22, 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: 3

Caution

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

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

3496-3508: Typo in schema name: Ignestion → Ingestion.

Public schema name has a typo and is referenced below. Fix now to avoid client lock-in.

- IgnestionBatchStatusCount:
+ IngestionBatchStatusCount:
   title: IgnestionBatchStatusCount
@@
- items:
-   $ref: '#/components/schemas/IgnestionBatchStatusCount'
+ items:
+   $ref: '#/components/schemas/IngestionBatchStatusCount'

Also update the title: to “IngestionBatchStatusCount”.

Also applies to: 3525-3529

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

1520-1541: Use 201 for creation + align request schema.

  • POST should return 201 Created.
  • Ensure CreateAssistantRequest uses the same enums/types as Assistant (see optimization/tool_resources below).
   responses:
-    '200':
+    '201':
       description: Successful Response

1619-1647: Consider 202 for async run + streaming compatibility.

If runs are asynchronous (MaestroRunResult with in_progress), prefer 202 Accepted. If streaming is supported, document SSE response content type.

   responses:
-    '200':
+    '202':
       description: Successful Response

1947-1969: Validate MCP inputs and formats.

  • Add format: uri to MCPDefinition.server_url.
  • Clarify auth requirements and rate limits in endpoint description.
 components:
   schemas:
     MCPDefinition:
       properties:
         server_url:
-          title: Server Url
-          type: string
+          title: Server Url
+          type: string
+          format: uri

2132-2167: Tooling/types consistency and safe defaults.

  • Good switch to public ToolDefinition union.
  • Assistant.tool_resources points to AssistantToolResource while other payloads use ToolResource; confirm intentional divergence.
  • Defaulting visibility: public may leak assistants; consider private.
-visibility:
-  allOf:
-    - $ref: '#/components/schemas/Visibility'
-  default: public
+visibility:
+  allOf:
+    - $ref: '#/components/schemas/Visibility'
+  default: private

2304-2308: Description mentions RFI in Regulations schema.

Body_upload_check_compliance.vector_store_id says “for RFI processing” but this endpoint is regulations/compliance.

- description: Vector store ID to use for RFI processing
+ description: Vector store ID to use for compliance checks

2723-2756: Add bounds/validation for new retrieval fields.

  • Provide min/max for max_documents (e.g., minimum 1).
  • retrieval_similarity_threshold elsewhere uses 0–1; mirror here if applicable.
 max_documents:
   title: Max Documents
-  type: integer
+  type: integer
+  minimum: 1

3307-3363: Strengthen FileSearchToolResource validation.

  • file_ids likely UUIDs.
  • retrieval_similarity_threshold should be 0.0–1.0 like other places.
 retrieval_similarity_threshold:
   title: Retrieval Similarity Threshold
-  type: number
+  type: number
+  minimum: 0.0
+  maximum: 1.0
 file_ids:
   title: File Ids
   type: array
   items:
-    type: string
+    type: string
+    format: uuid

3402-3486: HTTP tool schema: add URI formats and header typing.

  • Add format: uri to endpoint URLs.
  • Consider headers as additionalProperties: { type: string }.
 HTTPToolEndpoint:
   properties:
     url:
       title: Url
-      type: string
+      type: string
+      format: uri
     headers:
-      title: Headers
-      type: object
+      title: Headers
+      type: object
+      additionalProperties:
+        type: string

2943-2957: Response language: consider null vs 'unset'.

Using 'unset' as a sentinel is workable; alternatively allow omission or nullable: true to reduce enum churn.


3753-3791: Include error code/type for machine handling.

MaestroRunError only has message. Consider code and details for programmatic branching.

 MaestroRunError:
   properties:
     message:
       title: Message
       type: string
+    code:
+      title: Code
+      type: string
+    details:
+      title: Details
+      type: object

4118-4166: RunAssistantRequest input shape differs from Maestro.

Here input is strictly an array of Message; CreateMaestroRunsPayload.input allows string or array. Align or document why they differ to avoid UX confusion.

- input:
-   type: array
-   items:
-     $ref: '#/components/schemas/Message'
+ input:
+   anyOf:
+     - type: array
+       items:
+         $ref: '#/components/schemas/Message'
+     - type: string

4478-4495: WebSearchToolResource: enforce URL formats and sensible default.

  • Mark urls items as format: uri.
  • Add default fallback_to_web: false (explicit).
 urls:
   title: Urls
   type: array
   items:
-    type: string
+    type: string
+    format: uri
 fallback_to_web:
   title: Fallback To Web
   type: boolean
+  default: false

4638-4654: Misleading description for Requirement.id.

The copy-pasted “A unique ID for the request” is inaccurate for a requirement entity.

 id:
   title: Id
   type: string
-  description: "A unique ID for the request (not the message)..."
+  description: "Unique identifier of the requirement."
📜 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 54201ee.

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

2888-2901: OK: Tool union reference.

Good alignment to execution_engine ToolDefinition and dedicated ToolResource for Maestro.


4685-4698: Discriminator mapping: good structure.

The oneOf + discriminator over type looks correct and future‑proof.


2469-2473: Chat tool definition reference: looks correct.

The switch to public chat::ToolDefinition for ChatRequest.tools is consistent.

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 + tighten path param format.

  • Include a 404 response for unknown vector_store_id.
  • If IDs are UUIDs, add format: uuid to the path param.
  • Consider a concrete object schema instead of anonymous {} with a verbose title.
       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
                 type: object
+        '404':
+          description: Vector store not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/HTTPValidationError'
📝 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 Vector Store Id Get
type: object
'404':
description: Vector store not found
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 1018 to 1043, the GET
/studio/v1/demos/regulations/vector-store/{vector_store_id} operation is missing
a 404 response for unknown IDs, the path parameter lacks a concrete format, and
the successful response uses an anonymous object schema with an overly verbose
title; add a '404' response with a descriptive schema (or reference) for "Not
Found", add format: uuid to the vector_store_id parameter if IDs are UUIDs
(otherwise specify the correct format or a pattern), and replace the anonymous
response schema with a concrete reusable schema reference (e.g.,
components/schemas/VectorStore) or define a clear object schema with properties
so the response is well-typed.

Comment on lines +1590 to +1617
summary: Modify Assistant
operationId: v1_modify_assistant
parameters:
- name: assistant_id
in: path
required: true
schema:
title: Assistant Id
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ModifyAssistantRequest'
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'
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Mismatch: optimization type and tool_resources type.

ModifyAssistantRequest.optimization uses RunOptimization, but Assistant.optimization and CreateAssistantRequest.optimization are string. Also, CreateAssistantRequest.tool_resources is object while others use AssistantToolResource.

 # In Assistant.properties.optimization
-optimization:
-  title: Optimization
-  type: string
+optimization:
+  $ref: '#/components/schemas/RunOptimization'

 # In CreateAssistantRequest.properties.optimization
-optimization:
-  title: Optimization
-  type: string
+optimization:
+  $ref: '#/components/schemas/RunOptimization'

 # In CreateAssistantRequest.properties.tool_resources
-tool_resources:
-  title: Tool Resources
-  type: object
+tool_resources:
+  $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
summary: Modify Assistant
operationId: v1_modify_assistant
parameters:
- name: assistant_id
in: path
required: true
schema:
title: Assistant Id
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ModifyAssistantRequest'
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'
# components/schemas/Assistant (properties)
optimization:
$ref: '#/components/schemas/RunOptimization'
# components/schemas/CreateAssistantRequest (properties)
optimization:
$ref: '#/components/schemas/RunOptimization'
tool_resources:
$ref: '#/components/schemas/AssistantToolResource'
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 1590 to 1617, the schemas are
inconsistent: ModifyAssistantRequest.optimization references RunOptimization
while Assistant.optimization and CreateAssistantRequest.optimization are plain
strings, and CreateAssistantRequest.tool_resources is a generic object while
other definitions use AssistantToolResource; make these types consistent across
the API by either changing ModifyAssistantRequest.optimization to type: string
(to match Assistant and CreateAssistantRequest) or converting Assistant and
CreateAssistantRequest.optimization to $ref:
'#/components/schemas/RunOptimization' (pick one approach project-wide), and
change CreateAssistantRequest.tool_resources to use $ref:
'#/components/schemas/AssistantToolResource' (or update the
AssistantToolResource schema to match the object shape), then update any
references and examples accordingly to keep all three schemas aligned.

Comment on lines +2830 to 2873
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:
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

CreateAssistantRequest parity gaps.

  • Missing visibility and response_language present on Assistant/Modify.
  • See earlier note on optimization enum and tool_resources ref.
   properties:
+    visibility:
+      $ref: '#/components/schemas/Visibility'
+    response_language:
+      allOf:
+        - $ref: '#/components/schemas/Assistant.properties.response_language'

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 2830 to 2873, the
CreateAssistantRequest schema is missing fields and mismatches noted in the
review: add the visibility (string enum matching Assistant/Modify values) and
response_language (string, default/enum matching Assistant/Modify) properties to
the schema; update optimization to use the same enum definition used elsewhere
(replace plain string with a $ref to the existing Optimization enum or copy the
enum values) and change tool_resources from a generic object to the correct
referenced schema (use the same $ref used elsewhere for tool_resources); ensure
defaults match Assistant/Modify (e.g., assistant_type and budget already have
defaults) and validate the schema compiles with the rest of the spec.

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