Skip to content

Conversation

HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 18, 2025

Summary by CodeRabbit

  • New Features

    • Create, modify, and run assistants with richer configuration (budget, visibility, type, response language, requirements).
    • Manage assistant plans and routes; validate plans.
    • Discover MCP servers and tools.
    • Retrieve a vector store and use vector_store_id in compliance/RFI flows.
    • Enhanced tool integrations: HTTP, MCP, file search, and web search.
    • Options for structured RAG, dynamic planning, and run optimization.
  • API Changes

    • Standardized tool definitions and resources across endpoints.
    • Renamed certain public types and updated schemas; some requests/responses have new fields.

Copy link

coderabbitai bot commented Sep 18, 2025

Walkthrough

Adds multiple new Studio Assistant endpoints, MCP discovery, and a vector-store fetch. Overhauls tool/resource schemas with a new discriminated union, introduces new request/response models, enums, and requirement types, and wires vector_store_id into certain demo payloads. Updates Assistant and run payloads to use new tool/resource definitions.

Changes

Cohort / File(s) Summary of Changes
Assistant APIs
src/libs/AI21/openapi.yaml
Added endpoints: POST/PATCH /studio/v1/assistants, POST /assistants/{id}/run, GET/PATCH plans, GET/POST/PATCH/DELETE routes, POST validate_plan. Added request models: CreateAssistantRequest, ModifyAssistantRequest, RunAssistantRequest. Expanded Assistant schema (tools, requirements, budget, visibility, assistant_type, response_language).
MCP Discovery
src/libs/AI21/openapi.yaml
Added POST /studio/v1/mcp/discover. Introduced MCPDefinition, MCPDiscoveryResponse, MCPTool, MCPToolResource schemas.
Tooling/Schema Overhaul
src/libs/AI21/openapi.yaml
Replaced old ToolDefinition with language_studio_api_server__data_types__execution_engine__ToolDefinition (discriminated union over http, mcp, file_search, web_search). Added ToolResource wrapper with FileSearchToolResource and WebSearchToolResource sub-schemas.
HTTP Tooling Updates
src/libs/AI21/openapi.yaml
Introduced HTTPToolEndpoint, HTTPToolFunction, HTTPToolFunctionParameters and related properties. Repurposed/renamed HTTPValidationError to HTTPToolEndpoint. Updated references accordingly.
Enums and Requirements
src/libs/AI21/openapi.yaml
Added enums: AssistantType, Visibility, BudgetLevel, RunOptimization. Added requirement models: language_studio_api_server__data_types__assistant__Requirement and execution_engine__Requirement.
Vector Store & Demos
src/libs/AI21/openapi.yaml
Added GET /studio/v1/demos/regulations/vector-store/{vector_store_id}. Added vector_store_id to Body_upload_check_compliance and Body_process_rfi_document payloads.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant Assist as Assistant Service
  participant Plan as Plans/Routes
  participant Exec as Execution Engine

  rect rgb(240,248,255)
  note over Client,API: Create Assistant
  Client->>API: POST /studio/v1/assistants (CreateAssistantRequest)
  API->>Assist: Create
  Assist-->>API: Assistant
  API-->>Client: Assistant
  end

  rect rgb(248,250,240)
  note over Client,API: Run Assistant
  Client->>API: POST /studio/v1/assistants/{id}/run (RunAssistantRequest)
  API->>Plan: Fetch plan/routes
  API->>Exec: Execute with tools (http/mcp/file_search/web_search)
  Exec-->>API: MaestroRunResult
  API-->>Client: MaestroRunResult
  end
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as Studio API
  participant MCP as MCP Server

  rect rgb(240,240,255)
  note over Client,API: MCP Discovery
  Client->>API: POST /studio/v1/mcp/discover (MCPDefinition)
  API->>MCP: Discover tools (server_url, headers)
  MCP-->>API: Tools metadata
  API-->>Client: MCPDiscoveryResponse
  end
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as Demos API
  participant VS as Vector Store

  rect rgb(255,248,240)
  note over Client,API: Vector Store Lookup
  Client->>API: GET /demos/regulations/vector-store/{vector_store_id}
  API->>VS: Fetch by id
  VS-->>API: Vector store data
  API-->>Client: Vector store data
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60–90 minutes

Poem

I twitch my ears at schemas new,
Tools now line up, neat in view;
Assistants plan, then hop and run,
MCP maps where paths are spun.
Vector burrows store the lore—
I thump approval: add some more! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The PR title "feat:@coderabbitai" is a short tag-style label that does not describe the substantive changes in the changeset. The diff introduces large API and schema changes (new assistant endpoints, tool/resource union types, MCP discovery, vector-store fields, and many new schemas), so the title fails to convey the primary change. Because it is generic and non-descriptive, the title check is inconclusive. Please rename the PR to a concise, descriptive single sentence that highlights the main change (for example: "feat: add Studio assistant APIs, tool/resource schema, and MCP discovery"). Optionally include the affected component or file (openapi.yaml) or a ticket number for context. A clear title will help reviewers and changelog generation.
✅ 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_202509181833

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 18, 2025 18:34
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Add Studio Assistant endpoints, MCP discovery, vector-store fetch Sep 18, 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 (8)
src/libs/AI21/openapi.yaml (8)

1018-1043: Add 404 and a concrete schema for vector store.

Return 404 when the vector store isn’t found and reference a typed schema (e.g., VectorStore) instead of an untyped object for 200.

Apply:

   responses:
-    '200':
+    '200':
       description: Successful Response
       content:
         application/json:
           schema:
-            title: Response Get Vector Store Studio V1 Demos Regulations Vector Store  Vector Store Id  Get
-            type: object
+            $ref: '#/components/schemas/VectorStore'
+    '404':
+      description: Not Found
+      content:
+        application/json:
+          schema:
+            $ref: '#/components/schemas/HTTPValidationError'

1520-1541: Response codes for create/run; consider async 202.

  • Create Assistant should return 201 Created (and optionally Location), not 200.
  • Run Assistant appears async (status can be in_progress). Consider 202 Accepted with polling, or document sync semantics.
-  '200':
+  '201':
   description: Successful Response
-  '200':
+  '202':
   description: Accepted

Also applies to: 1590-1617, 1619-1647


1948-1969: MCP discovery: validate URL format.

Mark server_url as a URI and add basic constraints to improve client generation.

     schema:
       $ref: '#/components/schemas/MCPDefinition'

And in MCPDefinition (see lines 3674-3682):

- server_url:
+ server_url:
   title: Server Url
   type: string
+  format: uri

2287-2290: vector_store_id should be typed as UUID.

Likely a UUID. Add format to both RFI and compliance payloads.

 vector_store_id:
   title: Vector Store Id
   type: string
+  format: uuid

Also applies to: 2304-2307


3307-3362: FileSearchToolResource: add stronger typing.

  • file_ids likely UUIDs; add format.
  • retrieval_similarity_threshold and max_neighbors could have sensible bounds.
 file_ids:
   title: File Ids
   type: array
   items:
-    type: string
+    type: string
+    format: uuid
 retrieval_similarity_threshold:
   title: Retrieval Similarity Threshold
   type: number
+  minimum: 0.0
+  maximum: 1.0
 max_neighbors:
   title: Max Neighbors
   type: integer
+  minimum: 1

2723-2756: ConversationalRagConfig: add bounds for new fields.

Add minimum for max_documents and reuse same response_language default pattern (already good).

 max_documents:
   title: Max Documents
   type: integer
+  minimum: 1

3674-3688: Mark URLs with uri format.

Add format: uri to MCPDefinition.server_url, HTTPToolEndpoint.url, and WebSearchToolResource.urls items.

 HTTPToolEndpoint:
   properties:
     url:
       title: Url
-      type: string
+      type: string
+      format: uri
 WebSearchToolResource:
   properties:
     urls:
       title: Urls
       type: array
       items:
-        type: string
+        type: string
+        format: uri
 MCPDefinition:
   properties:
     server_url:
       title: Server Url
-      type: string
+      type: string
+      format: uri

Also applies to: 4467-4484, 3407-3413


2079-2093: Nit: copy-pasted “request ID” description on entity IDs.

“unique ID for the request” appears on entity types like Assistant. Consider revising to entity-appropriate wording.

📜 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 8f56fda.

⛔ Files ignored due to path filters (133)
  • 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.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 (22 hunks)
🔇 Additional comments (5)
src/libs/AI21/openapi.yaml (5)

2132-2166: Assistants: new enums/fields look good; watch tool_resources shape.

Assistant.tools switch to discriminated union is good. Defaults for budget/visibility/assistant_type/response_language look sane.

Confirm consumers tolerate Assistant.tool_resources (AssistantToolResource) differing from CreateMaestroRunsPayload.tool_resources (ToolResource).


2898-2901: Maestro run payloads: good move to typed ToolResource and union Tools.

The unionized tools and typed tool_resources improve codegen and validation.

Also applies to: 2908-2909, 2943-2956


3896-3949: Consider allowing assistant_type changes or document immutability.

ModifyAssistantRequest omits assistant_type. If immutable, document it; if mutable, add the field.


4107-4155: RunAssistantRequest: input shape and defaults look good.

Array-of-Message input with include defaults and toggles is clear. No issues.


2469-2473: Tool definitions: discriminated union and chat function tools are well-modeled.

Discriminator matches enum literals across resources; chat tools constrained to function type is appropriate.

Also applies to: 4644-4656, 4674-4687

Comment on lines +2344 to +2349
title: BudgetLevel
enum:
- low
- medium
- high
description: An enumeration.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Budget and optimization types are inconsistent across schemas.

  • BudgetLevel is lowercase enum; elsewhere budgets are free-form strings (and uppercase in descriptions). Unify to BudgetLevel.
  • CreateAssistantRequest.optimization is string, ModifyAssistantRequest.optimization uses RunOptimization. Align CreateAssistantRequest (and Assistant) to RunOptimization.
- optimization:
-   title: Optimization
-   type: string
+ optimization:
+   $ref: '#/components/schemas/RunOptimization'
- budget:
-   title: Budget
-   type: string
-   description: 'Budget level: LOW, MEDIUM, or HIGH'
-   default: MEDIUM
+ budget:
+   allOf:
+     - $ref: '#/components/schemas/BudgetLevel'
+   default: medium

Also applies to: 2830-2872, 3896-3949

🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 2344-2349 (also review ranges
2830-2872 and 3896-3949), enum values and budget/optimization types are
inconsistent: BudgetLevel is defined with lowercase enum values while other
schemas use free-form strings or uppercase, and
CreateAssistantRequest.optimization is a plain string whereas
ModifyAssistantRequest references RunOptimization. Update schemas to use a
single canonical BudgetLevel enum (normalize values/casing across all
occurrences), replace any free-form budget string fields with the BudgetLevel
type, and change CreateAssistantRequest and any Assistant objects to use the
RunOptimization schema (same type as ModifyAssistantRequest) so optimization is
consistently typed across the spec.

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

CreateAssistantRequest.tool_resources should mirror Assistant.

Use AssistantToolResource instead of untyped object for consistency.

 tool_resources:
-  title: Tool Resources
-  type: object
+  $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:
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:
$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 currently defines tool_resources as an untyped
object; replace that with the same schema used by Assistant (use a $ref to the
AssistantToolResource component) so CreateAssistantRequest.tool_resources
mirrors Assistant. Update the tool_resources property to reference the
AssistantToolResource component (e.g. replace the type: object block with a
$ref: '#/components/schemas/AssistantToolResource') and keep the existing title.

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

Bug: HTTPToolFunctionParameters.additionalProperties is misplaced.

additionalProperties must be at the schema level, not inside properties. Current spec defines a field named additionalProperties rather than constraining the schema.

Apply:

   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: 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:
title: HTTPToolEndpoint
required:
- url
type: object
properties:
url:
title: Url
type: string
headers:
title: Headers
type: object
HTTPToolFunction:
title: HTTPToolFunction
required:
- 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: 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:
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3402 to 3486 the
HTTPToolFunctionParameters schema incorrectly places additionalProperties as a
property inside the "properties" object (creating a field named
additionalProperties) instead of declaring it at the schema level; move the
additionalProperties entry out of the properties map to the same level as
"type", "properties", and "required", e.g. add an additionalProperties: { title:
Additionalproperties, type: boolean, default: false } directly under
HTTPToolFunctionParameters (not nested under properties) so the schema properly
constrains additional 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.

⚠️ Potential issue

Typo in schema name: Ignestion ➜ Ingestion (breaking for SDKs).

Rename the schema and update all $refs.

- IgnestionBatchStatusCount:
+ IngestionBatchStatusCount:
   title: Ingestion Batch Status Count
- items:
-   $ref: '#/components/schemas/IgnestionBatchStatusCount'
+ items:
+   $ref: '#/components/schemas/IngestionBatchStatusCount'

Also applies to: 3525-3529

🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3496-3500 (and similarly 3525-3529)
the schema name "IgnestionBatchStatusCount" is misspelled; rename the schema to
"IngestionBatchStatusCount" and update every $ref that points to the old name
accordingly across the OpenAPI file (search/replace all
"IgnestionBatchStatusCount" -> "IngestionBatchStatusCount"), ensuring the schema
definition and any examples/links are updated; after renaming, validate the
OpenAPI YAML and regenerate any SDKs or code that consume this spec to pick up
the corrected name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant