Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 21, 2025

Summary by CodeRabbit

  • New Features
    • Added endpoints to create, modify, and run assistants, discover MCP tools, and fetch regulations vector-store data.
    • Assistants now support requirements, budget levels, visibility, assistant types, and response language.
    • Introduced standardized tool/resource types (HTTP, Web Search, File Search, MCP) and related configurations.
    • Enhanced run flow with optimization options and improved error reporting.
    • Added support for vector_store_id in relevant requests.
@coderabbitai
Copy link

coderabbitai bot commented Sep 21, 2025

Walkthrough

Single OpenAPI spec updated to add assistant lifecycle and MCP discovery endpoints, introduce discriminated tool schemas (HTTP/MCP/File/Web), expand Assistant properties, add enums (AssistantType, BudgetLevel, Visibility, RunOptimization), define new tool/resource models, integrate Maestro run error handling, and add a vector-store demo endpoint with vector_store_id support.

Changes

Cohort / File(s) Change Summary
Assistant endpoints
src/libs/AI21/openapi.yaml
Added POST /studio/v1/assistants (create), PATCH /studio/v1/assistants/{assistant_id} (modify), POST /studio/v1/assistants/{assistant_id}/run (run). Introduced CreateAssistantRequest, ModifyAssistantRequest, RunAssistantRequest, and RunOptimization.
Assistant schema expansion
src/libs/AI21/openapi.yaml
Assistant now includes requirements, budget, visibility, assistant_type, response_language. tools now reference language_studio_api_server__data_types__execution_engine__ToolDefinition (discriminator-based). Added enums AssistantType, BudgetLevel, Visibility.
MCP discovery and types
src/libs/AI21/openapi.yaml
Added POST /studio/v1/mcp/discover. Introduced MCPDefinition, MCPDiscoveryResponse, MCPTool, MCPToolResource. Wired MCP tools into discriminated unions.
HTTP tool schema family
src/libs/AI21/openapi.yaml
Added HTTPToolEndpoint, HTTPToolFunction, HTTPToolFunctionParameters, HTTPToolFunctionParamProperties, HTTPToolResource. Standardized HTTP tool metadata in responses; adjusted related references.
File/Web search resources
src/libs/AI21/openapi.yaml
Added FileSearchToolResource and WebSearchToolResource. Introduced ToolResource and AssistantToolResource (renamed/restructured from ToolResources).
Maestro run results
src/libs/AI21/openapi.yaml
Added MaestroRunError and integrated into MaestroRunResult payloads for error reporting.
Vector store demo
src/libs/AI21/openapi.yaml
Added GET /studio/v1/demos/regulations/vector-store/{vector_store_id}`; added vector_store_id fields to relevant request bodies to support RFI paths.
Type consolidation
src/libs/AI21/openapi.yaml
Deprecated prior ToolDefinition references in favor of language_studio_api_server__data_types__execution_engine__ToolDefinition and language_studio_api_server__data_types__chat__ToolDefinition. Added assistant/execution_engine Requirement types.
Defaults and enums
src/libs/AI21/openapi.yaml
Updated default values for budget, visibility, response_language, and related enums across schemas.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant Assist as Assistant Service
  participant Tools as Tool Registry (HTTP/MCP/File/Web)
  participant Runner as Run Orchestrator
  participant Maestro as Maestro Engine

  rect rgba(230,245,255,0.6)
    note over Client,API: Create Assistant
    Client->>API: POST /studio/v1/assistants (CreateAssistantRequest)
    API->>Assist: Validate + store assistant (schemas with ToolDefinition discriminator)
    Assist-->>API: Assistant (assistant_type, budget, visibility, tools)
    API-->>Client: 201 Assistant
  end

  rect rgba(235,255,235,0.6)
    note over Client,API: Modify Assistant
    Client->>API: PATCH /studio/v1/assistants/{id} (ModifyAssistantRequest)
    API->>Assist: Update fields (requirements, tools, response_language, ...)
    Assist-->>API: Updated Assistant
    API-->>Client: 200 Assistant
  end

  rect rgba(255,245,230,0.6)
    note over Client,Maestro: Run Assistant
    Client->>API: POST /studio/v1/assistants/{id}/run (RunAssistantRequest + RunOptimization)
    API->>Runner: Start run
    Runner->>Tools: Resolve tool resources (HTTPTool/MCP/File/Web) via discriminator
    alt Uses Maestro
      Runner->>Maestro: Execute plan
      Maestro-->>Runner: Result or MaestroRunError
    else Non-Maestro
      Runner-->>API: Run result
    end
    API-->>Client: 200 Run result (may include error field for MaestroRunError)
  end
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant MCP as MCP Discovery

  rect rgba(245,240,255,0.6)
    note over Client,MCP: MCP Discovery
    Client->>API: POST /studio/v1/mcp/discover
    API->>MCP: Discover (MCPDefinition)
    MCP-->>API: MCPDiscoveryResponse (MCPTool, MCPToolResource)
    API-->>Client: 200 MCPDiscoveryResponse
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

I hop through specs where schemas bloom,
New tools in rows, assistants zoom—
MCP whispers, Maestro sings,
Discriminators flap their wings.
A vector-store carrot, crisp and bright—
I nibble enums into the night.
Thump! The run completes just right.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title "feat:@coderabbitai" is not a clear summary of the changes; it reads like an author/bot tag rather than a description of the main change. The PR actually updates the OpenAPI spec with new assistant and MCP endpoints, schemas, and related public types, but the title gives no indication of that scope. As a result, a reviewer scanning PR titles cannot understand the primary change from this title alone. Please update the title to a concise, specific sentence that names the affected area and primary change (for example: "feat(openapi): add assistants endpoints and MCP tool schemas" or "feat: add Create/Modify/Run assistant endpoints to OpenAPI"). Keep it short and focused, and add a brief PR description summarizing the key file and schema changes so reviewers can quickly grasp scope and intent.
✅ 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_202509210155

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 01:56
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai 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

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

1018-1043: Define a proper response schema and fix the verbose title.

The 200 response returns an untyped object with a noisy title. Prefer a dedicated schema (e.g., VectorStore) for codegen stability and readability.

Apply this diff and add the schema below:

-            application/json:
-              schema:
-                title: Response Get Vector Store Studio V1 Demos Regulations Vector Store  Vector Store Id  Get
-                type: object
+            application/json:
+              schema:
+                $ref: '#/components/schemas/VectorStore'

Add this schema (outside the hunk):

VectorStore:
  title: VectorStore
  type: object
  properties:
    id:
      type: string
    name:
      type: string
    stats:
      type: object

2305-2308: Correct vector_store_id description (wrong feature area).

This is under regulations/compliance but mentions RFI.

-          description: Vector store ID to use for RFI processing
+          description: Vector store ID to use for regulations compliance processing
📜 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 7d38815.

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

2472-2473: Good: Chat tools now use a typed ToolDefinition.

Switching to language_studio_api_server__data_types__chat__ToolDefinition improves validation and codegen.


3307-3362: FileSearchToolResource looks coherent.

Enum/type/discriminator align with ToolDefinition oneOf. Defaults are sensible.


3674-3745: MCP types look consistent.

Minimal requireds, clear resource shape, and discriminator compatibility.


3907-3960: ModifyAssistantRequest consistency is good.

Uses RunOptimization, AssistantToolResource, and enum fields; matches Assistant shape.


4118-4166: RunAssistantRequest is clear and narrowly scoped.

Defaults/read-only choices align with MaestroRunResult; include list looks intentional.


4685-4698: Discriminated union for ToolDefinition is correct.

type-based mapping matches sub-schemas; should work well with generators.

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.

⚠️ Potential issue

Align CreateAssistantRequest with ModifyAssistantRequest/Assistant (types and fields).

Inconsistencies: optimization should use RunOptimization; tool_resources should match AssistantToolResource; visibility/response_language are missing but exist on Assistant.

Apply:

   title: CreateAssistantRequest
@@
   properties:
@@
-    optimization:
-      title: Optimization
-      type: string
+    optimization:
+      $ref: '#/components/schemas/RunOptimization'
@@
-    tool_resources:
-      title: Tool Resources
-      type: object
+    tool_resources:
+      $ref: '#/components/schemas/AssistantToolResource'
@@
     budget:
       allOf:
         - $ref: '#/components/schemas/BudgetLevel'
       default: medium
+    visibility:
+      allOf:
+        - $ref: '#/components/schemas/Visibility'
+      default: public
     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
📝 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:
$ref: '#/components/schemas/language_studio_api_server__data_types__execution_engine__ToolDefinition'
tool_resources:
title: Tool Resources
type: object
requirements:
title: Requirements
type: array
items:
$ref: '#/components/schemas/language_studio_api_server__data_types__assistant__Requirement'
budget:
allOf:
- $ref: '#/components/schemas/BudgetLevel'
default: medium
assistant_type:
allOf:
- $ref: '#/components/schemas/AssistantType'
default: default
CreateMaestroRunsPayload:
title: CreateAssistantRequest
required:
- name
type: object
properties:
name:
title: Name
type: string
description:
title: Description
type: string
optimization:
$ref: '#/components/schemas/RunOptimization'
avatar:
title: Avatar
type: string
models:
title: Models
type: array
items:
type: string
tools:
title: Tools
type: array
items:
$ref: '#/components/schemas/language_studio_api_server__data_types__execution_engine__ToolDefinition'
tool_resources:
$ref: '#/components/schemas/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
visibility:
allOf:
- $ref: '#/components/schemas/Visibility'
default: public
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
CreateMaestroRunsPayload:
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 2830 to 2873, the
CreateAssistantRequest schema is inconsistent with
ModifyAssistantRequest/Assistant: change the optimization property to reference
the RunOptimization schema instead of plain string, update tool_resources to use
the AssistantToolResource schema (matching Assistant), and add the missing
visibility and response_language properties (with the same types/defaults as in
Assistant/ModifyAssistantRequest). Ensure models/tools/requirements remain
aligned to the corresponding schema refs and that any defaults (e.g.,
assistant_type, budget) match the Assistant definitions.
Comment on lines +3402 to +3486
title: HTTPToolEndpoint
required:
- url
type: object
properties:
detail:
title: Detail
type: array
items:
$ref: '#/components/schemas/ValidationError'
IgnestionBatchStatusCount:
title: IgnestionBatchStatusCount
url:
title: Url
type: string
headers:
title: Headers
type: object
HTTPToolFunction:
title: HTTPToolFunction
required:
- status
- count
- name
- description
- parameters
type: object
properties:
name:
title: Name
type: string
description:
title: Description
type: string
parameters:
$ref: '#/components/schemas/HTTPToolFunctionParameters'
HTTPToolFunctionParamProperties:
title: HTTPToolFunctionParamProperties
required:
- type
- description
type: object
properties:
type:
title: Type
type: string
description:
title: Description
type: string
HTTPToolFunctionParameters:
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: HTTPToolResource
required:
- function
- endpoint
type: object
properties:
type:
title: Type
enum:
- http
type: string
default: http
function:
$ref: '#/components/schemas/HTTPToolFunction'
endpoint:
$ref: '#/components/schemas/HTTPToolEndpoint'
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

❓ Verification inconclusive

HTTP tool family is well-structured.

Endpoint/function separation and parameter typing are clear. After fixing additionalProperties, this is solid.

Run an OpenAPI validator:


🏁 Script executed:

#!/bin/bash
pip -q install openapi-spec-validator prance >/dev/null 2>&1
python - <<'PY'
from openapi_spec_validator import validate_spec
import yaml, sys
with open('src/libs/AI21/openapi.yaml') as f:
    spec=yaml.safe_load(f)
validate_spec(spec)  # raises on error
print("openapi-spec-validator: OK")
PY
prance validate --no-cache src/libs/AI21/openapi.yaml

Length of output: 606


OpenAPI validation failed — duplicate operationId in spec

HTTP tool family is well-structured; validator raised a blocking error.

  • DuplicateOperationIDError: Operation ID 'v1_library_management' for GET /studio/v1/library/files/{file_id} is duplicated — make operationId values unique (search/rename the other occurrence) in src/libs/AI21/openapi.yaml.
  • prance not found in the sandbox (prance: command not found). After fixing, re-run openapi-spec-validator and prance locally or add prance to dev deps.
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3402 to 3486 there is a duplicate
operationId: 'v1_library_management' used for GET
/studio/v1/library/files/{file_id}; locate the other occurrence of this
operationId in the spec and rename one of them to a unique, descriptive
operationId (e.g., append _getFile or similar) and ensure any references or
client generation expectations are updated accordingly; then validate the
OpenAPI spec again (run openapi-spec-validator) and install/run prance locally
or add prance to devDependencies (e.g., add to package.json devDeps) so the spec
can be parsed in CI.
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 additionalProperties (currently a data property, not a schema rule).

You likely intended to disallow extraneous keys. In OpenAPI, additionalProperties is a schema-level field.

   HTTPToolFunctionParameters:
     title: HTTPToolFunctionParameters
     required:
       - properties
       - required
     type: object
+    additionalProperties: false
     properties:
@@
-      additionalProperties:
-        title: Additionalproperties
-        type: boolean
-        default: false
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3443 to 3469, the schema
HTTPToolFunctionParameters incorrectly defines a data property named
"additionalProperties" under properties instead of using the OpenAPI
schema-level additionalProperties keyword to control extraneous keys; remove the
"additionalProperties" entry from the properties list (or rename it if it is
intended as actual data) and set additionalProperties: false (or appropriate
schema) at the same level as title/type/properties/required so the schema
prevents unknown properties.
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.

🛠️ Refactor suggestion

🧩 Analysis chain

Typo in schema name: Ignestion → Ingestion (and update references).

Spelling error propagates to $ref and codegen names.

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

Verify no remaining references:

Also applies to: 3525-3529


🏁 Script executed:

#!/bin/bash
rg -nP 'IgnestionBatchStatusCount|IngestionBatchStatusCount' -C2 src/libs/AI21/openapi.yaml

Length of output: 422


Rename schema: IgnestionBatchStatusCount → IngestionBatchStatusCount

Typo confirmed — rename the schema key and update all $ref usages; also update the schema's title to match (affects generated types).

Locations: src/libs/AI21/openapi.yaml — lines 3495–3496 (definition) and 3528 ($ref).

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

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

🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3496-3500 (definition) and 3528
($ref), rename the schema key "IgnestionBatchStatusCount" to
"IngestionBatchStatusCount", update the schema's title to
"IngestionBatchStatusCount", and update all $ref usages (notably the ref at line
3528) to reference the new name; then regenerate or update any generated
types/usages in the codebase so they match the new schema name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants