Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 21, 2025

Summary by CodeRabbit

  • New Features
    • Manage Assistants via new endpoints to create, update, and run, with support for budget, visibility, type, and response language.
    • Discover MCP tools through a dedicated endpoint.
    • Enhanced tool integrations: HTTP, MCP, Web/File Search with structured resources and improved validation.
    • Expanded run options: verbose mode, output type, include filters, structured RAG, dynamic planning, response language (with unset), and cost/latency optimization.
    • Added endpoint to retrieve regulation vector-store demos.

@coderabbitai
Copy link

coderabbitai bot commented Sep 21, 2025

Walkthrough

Adds multiple Studio API endpoints (assistants create/patch/run, MCP discovery, regulations vector-store fetch) and extensively refactors schemas to a discriminated ToolDefinition model. Introduces Assistant types, budgets, visibility, new HTTP/MCP tool structures, expanded run request/options, Maestro result/error handling, and broader organizational/workspace models.

Changes

Cohort / File(s) Summary of edits
New Studio endpoints
src/libs/AI21/openapi.yaml
Added POST /studio/v1/assistants, PATCH /studio/v1/assistants/{assistant_id}, POST /studio/v1/assistants/{assistant_id}/run, POST /studio/v1/mcp/discover.
Regulations vector-store endpoint
src/libs/AI21/openapi.yaml
Added GET /studio/v1/demos/regulations/vector-store/{vector_store_id} with 200/422 responses and path parameter.
Assistant models and requests
src/libs/AI21/openapi.yaml
Added CreateAssistantRequest, ModifyAssistantRequest, AssistantType, BudgetLevel; updated Assistant with requirements, budget, visibility, assistant_type, response_language; linked new tool refs.
Run request and optimization
src/libs/AI21/openapi.yaml
Added RunAssistantRequest with input/verbose/output_type/include/structured_rag_enabled/dynamic_planning_enabled/response_language; added RunOptimization enum; wired into assistants run path.
Discriminated ToolDefinition refactor
src/libs/AI21/openapi.yaml
Replaced ToolDefinition with language_studio_api_server__data_types__execution_engine__ToolDefinition using discriminator (http, mcp, file_search, web_search); updated all references.
Tool resources restructuring
src/libs/AI21/openapi.yaml
Replaced ToolResources with ToolResource; added/updated FileSearchToolResource, WebSearchToolResource, MCPToolResource, HTTPToolResource and nested structures.
HTTP tool structures
src/libs/AI21/openapi.yaml
Added HTTPToolEndpoint, HTTPToolFunction, HTTPToolFunctionParameters and ParamProperties; updated related error schema HTTPValidationError alignment.
MCP tooling and discovery
src/libs/AI21/openapi.yaml
Added MCPDefinition, MCPTool, MCPDiscoveryResponse; introduced MCP-related resources and schemas; added POST /studio/v1/mcp/discover usage.
Maestro and execution results
src/libs/AI21/openapi.yaml
Expanded CreateMaestroRunsPayload to new ToolDefinition/ToolResource; updated MaestroRunResult with optional error; added MaestroRunError.
Org/workspace/visibility models
src/libs/AI21/openapi.yaml
Added/expanded visibility enums and workspace/org-related schemas (e.g., Demo, DemoCreate/Update, Visibility fields).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant StudioAPI as Studio API
  participant AssistSvc as Assistants Service
  participant ExecEng as Execution Engine
  participant Tools as Tools (HTTP/MCP/File/Web)

  rect rgba(230,245,255,0.5)
  Client->>StudioAPI: POST /studio/v1/assistants {CreateAssistantRequest}
  StudioAPI->>AssistSvc: Create Assistant
  AssistSvc-->>StudioAPI: Assistant
  StudioAPI-->>Client: 200 Assistant
  end

  rect rgba(245,230,255,0.5)
  Client->>StudioAPI: PATCH /studio/v1/assistants/{id} {ModifyAssistantRequest}
  StudioAPI->>AssistSvc: Modify Assistant
  AssistSvc-->>StudioAPI: Assistant
  StudioAPI-->>Client: 200 Assistant
  end

  rect rgba(230,255,230,0.5)
  Client->>StudioAPI: POST /studio/v1/assistants/{id}/run {RunAssistantRequest}
  StudioAPI->>ExecEng: Start run (tools, requirements, budget)
  alt Tool invocation(s)
    ExecEng->>Tools: Call via ToolDefinition (http|mcp|file|web)
    Tools-->>ExecEng: Results / errors
  end
  ExecEng-->>StudioAPI: Run result (or MaestroRunError)
  StudioAPI-->>Client: 200 MaestroRunResult | 422 Error
  end
Loading
sequenceDiagram
  autonumber
  actor Client
  participant StudioAPI as Studio API
  participant MCPDisc as MCP Discovery

  rect rgba(255,245,230,0.5)
  Client->>StudioAPI: POST /studio/v1/mcp/discover
  StudioAPI->>MCPDisc: Discover tools
  MCPDisc-->>StudioAPI: MCPDiscoveryResponse (MCPDefinition, MCPTool...)
  StudioAPI-->>Client: 200 MCPDiscoveryResponse
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

I thump my paws—new routes appear,
Assistants wake, their tools draw near.
MCP whispers, HTTP sings,
Budgets, types, and runs take wing.
In structured burrows, schemas grow—
I nibble docs, then off I go! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The PR title "feat:@coderabbitai" is vague and does not describe the substantive OpenAPI changes in the changeset; the raw summary shows large additions and refactors (new Studio assistant endpoints, MCP discovery, and many tool/schema updates). A PR title should summarize the primary change so reviewers scanning history understand intent. Because the title provides no meaningful description of the main change, the check is inconclusive. Please rename the PR to a concise, descriptive title that highlights the main change—for example: "feat(openapi): add Studio assistant endpoints and discriminated tool schemas" or "feat(studio): add assistants, run endpoint, and MCP tool discovery to openapi.yaml"—then rerun checks or request review so the title clearly communicates intent to reviewers.
✅ 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_202509212118

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 21:19
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Add Studio endpoints; refactor schemas to discriminated ToolDefinition 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: 2

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: Rename typo’d schema IgnestionBatchStatusCountIngestionBatchStatusCount and update refs.

This leaks into client SDK names. Fix now to avoid breaking changes later.

-  IgnestionBatchStatusCount:
-    title: IgnestionBatchStatusCount
+  IngestionBatchStatusCount:
+    title: IngestionBatchStatusCount
@@
-        statuses:
+        statuses:
           title: Statuses
           type: array
           items:
-            $ref: '#/components/schemas/IgnestionBatchStatusCount'
+            $ref: '#/components/schemas/IngestionBatchStatusCount'

Also applies to: 3525-3529

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

2910-2916: Unify budget enum usage.

CreateMaestroRunsPayload.budget redefines the enum locally; prefer $ref: BudgetLevel for consistency and single source of truth.

-      budget:
-        title: Budget
-        enum:
-          - low
-          - medium
-          - high
-        type: string
+      budget:
+        allOf:
+          - $ref: '#/components/schemas/BudgetLevel'

Also applies to: 2344-2349


1018-1043: Vector store path: add UUID format for vector_store_id.

Improves client generation and validation.

         - name: vector_store_id
           in: path
           required: true
           schema:
             title: Vector Store Id
-            type: string
+            type: string
+            format: uuid

Also applies to: 1024-1030


2304-2307: Fix description: endpoint is “regulations” not “RFI”.

Copy-paste mismatch may confuse users.

       vector_store_id:
         title: Vector Store Id
         type: string
-        description: Vector store ID to use for RFI processing
+        description: Vector store ID to use for regulations compliance processing

3402-3413: Tighten URL and header schemas for HTTP/MCP tools.

  • Add format: uri to URLs.
  • Specify header values as strings via additionalProperties: { type: string }.
   HTTPToolEndpoint:
@@
-    url:
+    url:
       title: Url
-      type: string
+      type: string
+      format: uri
-    headers:
+    headers:
       title: Headers
-      type: object
+      type: object
+      additionalProperties:
+        type: string
   MCPDefinition:
@@
-    server_url:
+    server_url:
       title: Server Url
-      type: string
+      type: string
+      format: uri
@@
-    headers:
+    headers:
       title: Headers
-      type: object
+      type: object
+      additionalProperties:
+        type: string
   MCPToolResource:
@@
-    server_url:
+    server_url:
       title: Server Url
-      type: string
+      type: string
+      format: uri
@@
-    headers:
+    headers:
       title: Headers
-      type: object
+      type: object
+      additionalProperties:
+        type: string

Also applies to: 3674-3688, 3719-3745

📜 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 5f79b80.

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

1520-1541: LGTM: assistants create/patch/run endpoints.

OperationIds are unique, request/response wiring matches introduced schemas.

If you have an OpenAPI validator handy, please run a quick validation to catch any overlooked $ref issues around these additions.

Also applies to: 1590-1617, 1619-1647


1948-1969: LGTM: MCP tool discovery endpoint.

Matches MCPDefinition/MCPDiscoveryResponse models.


2132-2167: LGTM: Assistant schema extensions (tools union, requirements, budget, visibility, type, response_language).

Defaults look sane; discriminated ToolDefinition improves client ergonomics.

Also applies to: 2242-2247, 2344-2349


3307-3363: LGTM: FileSearchToolResource.

Clear, explicit knobs; defaults align with existing RAG configs.


3402-3486: HTTP Tool suite + HTTPValidationError: solid foundation.

Once the additionalProperties fix is applied, this set should validate cleanly.

Also applies to: 3487-3495


3753-3761: LGTM: MaestroRun error surface.

Error field makes polling UX clearer.

Also applies to: 3790-3791


4118-4166: LGTM: RunAssistantRequest.

Reasonable defaults; include list is practical.


4685-4698: LGTM: Discriminated ToolDefinition union.

Discriminator mapping matches resource type values.

Comment on lines +2830 to +2872
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
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 new enums and resources.

  • optimization should reuse RunOptimization (not a free string).
  • tool_resources should mirror Assistant/ModifyAssistant types and use AssistantToolResource.
       optimization:
-        title: Optimization
-        type: string
+        $ref: '#/components/schemas/RunOptimization'
@@
-      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
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
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
assistant_type:
allOf:
- $ref: '#/components/schemas/AssistantType'
default: default
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 2830 to 2872, the
CreateAssistantRequest schema uses a free-form string for `optimization` and a
generic object for `tool_resources`; update `optimization` to reference the
existing `RunOptimization` enum schema (replace the string type with an
allOf/$ref or $ref to `#/components/schemas/RunOptimization`), and change
`tool_resources` to match the Assistant/ModifyAssistant definitions by
referencing the `AssistantToolResource` schema (mirror their structure—use an
object/$ref to `#/components/schemas/AssistantToolResource` or an object with
additionalProperties typed per that schema) so the request aligns with the new
enums and resource types.

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 JSON Schema: move additionalProperties out of properties.

HTTPToolFunctionParameters currently models additionalProperties as a field, which validators ignore. It must be a schema keyword sibling of properties/required.

Apply:

   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
+    additionalProperties: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
title: HTTPToolFunctionParameters
required:
- properties
- required
type: object
properties:
type:
title: Type
enum:
- object
type: string
default: object
properties:
title: Properties
type: object
additionalProperties:
$ref: '#/components/schemas/HTTPToolFunctionParamProperties'
required:
title: Required
type: array
items:
type: string
additionalProperties:
title: Additionalproperties
type: boolean
default: false
HTTPToolResource:
title: HTTPToolFunctionParameters
required:
- properties
- required
type: object
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: false
HTTPToolResource:
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3443 to 3469, the
HTTPToolFunctionParameters schema incorrectly defines additionalProperties as a
property inside properties; move that additionalProperties declaration out of
the properties map so it becomes a sibling of properties and required (i.e.,
top-level keyword for the schema), keep it as type boolean with default: false,
and remove the nested additionalProperties entry from the properties object so
validators will honor the schema-level additionalProperties setting.

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