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 API endpoints.
    • Discover MCP tools through a new discovery endpoint.
    • Fetch vector stores by ID.
  • Improvements
    • Assistants now support visibility (public/private), budget levels, assistant types, and response language settings.
    • Expanded run controls: optimization (cost/latency), verbosity, structured RAG, and dynamic planning.
    • Unified tool and resource handling across requests for simpler configuration.
    • Enhanced error reporting for run results.
@coderabbitai
Copy link

coderabbitai bot commented Sep 21, 2025

Walkthrough

Introduces new Studio API endpoints for assistants (create, modify, run), MCP tool discovery, and a vector store fetch by ID. Broadly refactors schemas to new namespaced ToolDefinition/ToolResource types, adds multiple new enums and request/response schemas, and updates numerous component references within the OpenAPI document.

Changes

Cohort / File(s) Summary
Studio Assistants Endpoints
src/libs/AI21/openapi.yaml
Added POST /studio/v1/assistants, PATCH /studio/v1/assistants/{assistant_id}, POST /studio/v1/assistants/{assistant_id}/run with corresponding request/response schemas (CreateAssistantRequest, ModifyAssistantRequest, RunAssistantRequest, Assistant, MaestroRunResult, MaestroRunError).
MCP Discovery
src/libs/AI21/openapi.yaml
Added POST /studio/v1/mcp/discover for MCP tool discovery using MCPDefinition and MCPDiscoveryResponse; includes MCPTool and MCPToolResource schemas; duplicate path entry noted.
Vector Store Fetch
src/libs/AI21/openapi.yaml
Added GET /studio/v1/demos/regulations/vector-store/{vector_store_id} returning 200/422.
Tooling Schema Refactor
src/libs/AI21/openapi.yaml
Replaced AssistantTool/ToolResources with language_studio_api_server__data_types__execution_engine__ToolDefinition and ToolResource; added WebSearchToolResource and FileSearchToolResource; updated CreateMaestroRunsPayload and related references.
Assistant Model Extensions
src/libs/AI21/openapi.yaml
Assistant schema extended with requirements, budget (BudgetLevel), visibility (Visibility), assistant_type (AssistantType), response_language; added RunOptimization enum; updated request bodies to include tools, tool_resources, requirements, models, budgets, languages.
Maestro Result Enhancements
src/libs/AI21/openapi.yaml
MaestroRunResult extended with optional error (MaestroRunError); updated execution engine requirement/types to namespaced variants.
Global Reference Updates
src/libs/AI21/openapi.yaml
Broad component pointer updates to language_studio_api_server_data_types_... definitions across Assistant, ChatRequest, and related schemas; added default values and enums across multiple shapes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant Studio API
  participant Assistant Engine
  participant MCP Service
  participant Vector Store

  rect rgb(240,248,255)
    note over Client,Studio API: Assistant lifecycle
    Client->>Studio API: POST /studio/v1/assistants (CreateAssistantRequest)
    Studio API->>Assistant Engine: Create Assistant (tools, tool_resources, requirements)
    Assistant Engine-->>Studio API: Assistant
    Studio API-->>Client: 200 Assistant
    Client->>Studio API: PATCH /studio/v1/assistants/{id} (ModifyAssistantRequest)
    Studio API->>Assistant Engine: Update Assistant
    Assistant Engine-->>Studio API: Assistant
    Studio API-->>Client: 200 Assistant
    Client->>Studio API: POST /studio/v1/assistants/{id}/run (RunAssistantRequest)
    Studio API->>Assistant Engine: Run Assistant
    alt success
      Assistant Engine-->>Studio API: MaestroRunResult
    else error
      Assistant Engine-->>Studio API: MaestroRunResult { error: MaestroRunError }
    end
    Studio API-->>Client: 200 MaestroRunResult or 422
  end

  rect rgb(245,255,250)
    note over Client,Studio API: MCP discovery
    Client->>Studio API: POST /studio/v1/mcp/discover (MCPDefinition)
    Studio API->>MCP Service: Discover tools/resources
    MCP Service-->>Studio API: MCPDiscoveryResponse
    Studio API-->>Client: 200 MCPDiscoveryResponse or 422
  end

  rect rgb(255,250,240)
    note over Client,Studio API: Vector store fetch
    Client->>Studio API: GET /studio/v1/demos/regulations/vector-store/{vector_store_id}
    Studio API->>Vector Store: Fetch by ID
    Vector Store-->>Studio API: Vector store data
    Studio API-->>Client: 200 or 422
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

I thump my paws at schema dawn,
New routes hop out, the spec redrawn.
Tools renamed, resources align,
Assistants run—results divine.
MCP whispers, vectors store—
I nibble docs and ask for more. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title "feat:@coderabbitai" is a short, tag-style label that does not describe the PR's primary changes (which add multiple studio/v1 assistant endpoints, MCP discovery endpoints, and many OpenAPI schema updates). Because it is non-descriptive and appears to be an attribution or bot tag rather than a summary of the work, the title is too vague to determine whether it accurately reflects the changes. Please rename the PR to a concise, descriptive title that highlights the main change, for example: "Add studio/v1 assistant create/modify/run endpoints and MCP discovery to openapi.yaml" or the shorter "Add Assistant and MCP discovery endpoints to OpenAPI".
✅ 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_202509211520

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 15:20
@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: 1

📜 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 a0c4293.

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

1018-1043: LGTM: New vector store endpoint added.

The new GET endpoint for retrieving vector store by ID follows consistent OpenAPI patterns and includes proper error handling.


1520-1541: LGTM: Assistant creation endpoint added.

The POST endpoint for creating assistants follows REST conventions and references the appropriate request/response schemas.


1589-1617: LGTM: Assistant modification endpoint added.

The PATCH endpoint for modifying assistants follows standard patterns and uses appropriate request/response schemas.


1618-1647: LGTM: Assistant execution endpoint added.

The POST endpoint for running assistants is well-structured and returns the expected MaestroRunResult.


1947-1969: LGTM: MCP tool discovery endpoint added.

The new endpoint for MCP tool discovery follows consistent API patterns and includes proper schema references.


2135-2166: LGTM: Assistant schema extended with comprehensive new fields.

The additions to the Assistant schema include:

  • Requirements array with proper typing
  • Budget level with sensible default
  • Visibility control
  • Assistant type categorization
  • Response language options with internationalization support

All fields have appropriate defaults and follow established patterns.


2241-2247: LGTM: AssistantType enum properly defined.

The enum values (default, chat, maestro) provide clear categorization for different assistant types.


2304-2307: LGTM: Vector store ID field added to compliance request.

The addition of the vector_store_id field with proper description enhances the compliance checking functionality.


2343-2349: LGTM: Consistent enum additions across schemas.

New enums (BudgetLevel, RetrievalStrategy, response languages) are properly defined and consistently applied across multiple request/response schemas. The addition of "unset" as a default language option is a good practice.

Also applies to: 2471-2473, 2723-2725, 2753-2755, 2954-2956


2829-2872: LGTM: CreateAssistantRequest schema well-structured.

The schema includes all necessary fields for assistant creation with appropriate types and defaults. The required field limitation to just name provides flexibility while ensuring essential information.


3306-3362: LGTM: FileSearchToolResource schema comprehensive.

The new schema provides extensive configuration options for file search including:

  • Retrieval parameters (similarity threshold, strategy)
  • Filtering options (labels, file IDs, path)
  • Internationalization support
  • Sensible defaults

3401-3495: LGTM: HTTP tool integration schemas well-designed.

The new HTTP tool schemas (HTTPToolEndpoint, HTTPToolFunction, HTTPToolResource) provide a complete framework for HTTP-based tool integration with proper parameter validation and structure.


3673-3744: LGTM: MCP integration schemas properly structured.

The MCP (Model Context Protocol) schemas provide comprehensive support for:

  • Tool discovery and definition
  • Server configuration with headers
  • Tool resource management with security controls (allowed_tools)

3752-3790: LGTM: Error handling enhanced with MaestroRunError.

The addition of an optional error field to MaestroRunResult improves error reporting and debugging capabilities.


3906-3959: LGTM: ModifyAssistantRequest supports comprehensive updates.

The schema allows modification of all relevant assistant properties while maintaining type safety and proper defaults.


4117-4166: LGTM: RunAssistantRequest provides flexible execution options.

The schema supports various execution modes with structured defaults and proper typing for all configuration options.


4167-4172: LGTM: RunOptimization enum clear and actionable.

The cost vs latency optimization options provide clear operational choices.


4347-4354: LGTM: New tool resource schemas complete the integration framework.

ToolResource, Visibility enum, and WebSearchToolResource provide the final pieces for comprehensive tool management with proper access control and web search capabilities.

Also applies to: 4471-4476, 4477-4494


4637-4697: Verify the extensive namespace schema definitions are necessary — 4 unique patterns found

rg: 13 matches in src/libs/AI21/openapi.yaml; unique namespaced schemas:

  • language_studio_api_server__data_types__assistant__Requirement
  • language_studio_api_server__data_types__chat__ToolDefinition
  • language_studio_api_server__data_types__execution_engine__Requirement
  • language_studio_api_server__data_types__execution_engine__ToolDefinition

If these prefixes are intentional (e.g., to avoid collisions across generated libs) add a short comment/doc and keep; otherwise consolidate/simplify schema names to reduce namespace noise.


2898-2908: Namespaced ToolDefinition & Requirement are consistent in this file — no change required.

Both schemas are defined (src/libs/AI21/openapi.yaml lines 4668 and 4684) and are referenced throughout this file (e.g. lines 2132, 2856, 2898, 2908, 3934); CreateMaestroRunsPayload’s namespaced refs match those definitions.

type: object
additionalProperties:
$ref: '#/components/schemas/AssistantTool'
$ref: '#/components/schemas/language_studio_api_server__data_types__execution_engine__ToolDefinition'
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

🧩 Analysis chain

Verify namespace consistency for ToolDefinition references.

The schema now references language_studio_api_server__data_types__execution_engine__ToolDefinition instead of a simpler ToolDefinition. Ensure this namespace change is applied consistently across all tool-related schemas.


🏁 Script executed:

#!/bin/bash
# Search for any remaining references to the old ToolDefinition schema
rg -n "ToolDefinition" --type yaml | grep -v "language_studio_api_server__data_types" | head -20

Length of output: 341


Fix inconsistent ToolDefinition schema references (namespace mismatch)

OpenAPI mixes the namespaced schema and plain ToolDefinition/FunctionToolDefinition — update the remaining plain references to #/components/schemas/language_studio_api_server__data_types__execution_engine__ToolDefinition to avoid broken $ref/codegen.

Locations: src/libs/AI21/openapi.yaml — ~3387-3388 (FunctionToolDefinition title), 4655 (title: ToolDefinition), 4667 ($ref: '#/components/schemas/FunctionToolDefinition'), 4685 (title: ToolDefinition).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants