Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 20, 2025

Summary by CodeRabbit

  • New Features

    • Create, modify, and run assistants via new API endpoints.
    • Create plans for assistants.
    • Discover MCP tools through a dedicated endpoint.
    • Retrieve regulation vector store details.
  • Improvements

    • Assistants now support requirements, budget levels, visibility, assistant types, and response language preferences.
    • Expanded tool integration, including HTTP, web search, and file search resources.
    • Run results now include explicit error details.
    • More consistent retrieval strategy and default behaviors across requests and responses.
@coderabbitai
Copy link

coderabbitai bot commented Sep 20, 2025

Walkthrough

The OpenAPI spec adds new endpoints for assistants, MCP discovery, and vector store retrieval; introduces numerous public schemas (assistant lifecycle, tools, HTTP/MCP resources); replaces prior ToolDefinition references with namespaced types; expands Assistant schema fields; and updates run/result payloads to include error and configuration options.

Changes

Cohort / File(s) Summary
Endpoints: Assistants lifecycle
src/libs/AI21/openapi.yaml
Added POST /studio/v1/assistants, PATCH /studio/v1/assistants/{assistant_id}, POST /studio/v1/assistants/{assistant_id}/run; request/response schemas wired to new Assistant and RunAssistantRequest/MaestroRunResult.
Endpoints: MCP discovery
src/libs/AI21/openapi.yaml
Added POST /studio/v1/mcp/discover with MCPDefinition input and MCPDiscoveryResponse output.
Endpoints: Vector store
src/libs/AI21/openapi.yaml
Added GET /studio/v1/demos/regulations/vector-store/{vector_store_id} returning vector store or HTTPValidationError.
Schemas: Assistant lifecycle
src/libs/AI21/openapi.yaml
Added CreateAssistantRequest, ModifyAssistantRequest, RunAssistantRequest, RunOptimization; extended Assistant with requirements, budget, visibility, assistant_type, response_language; updated tools reference.
Schemas: Tooling refactor
src/libs/AI21/openapi.yaml
Removed top-level ToolDefinition; replaced usages with language_studio_api_server__data_types__execution_engine__ToolDefinition; introduced ToolResource, FileSearchToolResource, WebSearchToolResource; aligned ToolParameters and related references.
Schemas: HTTP tools
src/libs/AI21/openapi.yaml
Added HTTPToolEndpoint, HTTPToolFunction, HTTPToolFunctionParameters, HTTPToolFunctionParamProperties, HTTPToolResource; exposed via public interfaces.
Schemas: MCP
src/libs/AI21/openapi.yaml
Added MCPDefinition, MCPDiscoveryResponse, MCPTool, MCPToolResource.
Schemas: Shared/types
src/libs/AI21/openapi.yaml
Added BudgetLevel, AssistantType, Visibility, RetrievalStrategy (referenced via allOf), namespaced Requirement types and chat/execution ToolDefinition variants.
Schemas: Runs and errors
src/libs/AI21/openapi.yaml
Updated MaestroRunResult to include error: MaestroRunError; exposed/adjusted HTTPValidationError and ValidationError contexts; added defaults/enums for response language and budget.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant API as API Server
  participant AS as Assistants Service
  participant EE as Execution Engine
  participant Tools as Tooling (HTTP/MCP/Web/File)
  note over Client,API: Create / Modify Assistant
  Client->>API: POST /studio/v1/assistants (CreateAssistantRequest)
  API->>AS: Create Assistant
  AS-->>API: Assistant
  API-->>Client: Assistant

  Client->>API: PATCH /studio/v1/assistants/{id} (ModifyAssistantRequest)
  API->>AS: Modify Assistant
  AS-->>API: Assistant
  API-->>Client: Assistant

  rect rgba(200, 240, 255, 0.3)
  note over Client,EE: Run Assistant (new/updated flow)
  Client->>API: POST /studio/v1/assistants/{id}/run (RunAssistantRequest)
  API->>EE: Start Maestro run (tools, retrievalStrategy, responseLanguage)
  EE->>Tools: Invoke tool(s) as needed
  alt Tool success
    Tools-->>EE: Tool results
  else Tool error
    Tools-->>EE: Error details
  end
  EE-->>API: MaestroRunResult (may include error)
  API-->>Client: MaestroRunResult
  end
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as API Server
  participant MCP as MCP Discovery
  note over Client,API: MCP Discovery
  Client->>API: POST /studio/v1/mcp/discover (MCPDefinition)
  API->>MCP: Discover tools/resources
  MCP-->>API: MCPDiscoveryResponse
  API-->>Client: MCPDiscoveryResponse
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as API Server
  participant VS as Vector Store Service
  note over Client,API: Vector store retrieval
  Client->>API: GET /studio/v1/demos/regulations/vector-store/{id}
  API->>VS: Fetch vector store by id
  alt Found
    VS-->>API: Vector store object
    API-->>Client: 200 Vector store
  else Validation error
    VS-->>API: HTTPValidationError
    API-->>Client: 4xx HTTPValidationError
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

I twitch my ears at schemas new,
Tools hop in lines, with names askew;
Assistants run, plans sprout like spring—
MCPs discovered, vectors sing.
In YAML fields I thump with glee,
A rabbit proud of API. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title "feat:@coderabbitai" is non-descriptive and does not summarize the PR's primary changes (new /studio/v1/assistants endpoints, extensive tool/resource schema refactor, MCP discovery, and HTTP tool schemas), so a reviewer cannot tell the main change at a glance; it reads like a bot tag rather than a concise feature summary. Under the provided criteria this is too vague to be considered a pass. Please rename the PR to a concise, specific title that highlights the main change and scope, for example "feat(studio): add assistants endpoints and tool/resource schema refactor" or "feat(openapi): add assistants API, MCP discovery, and HTTP tool schemas", and include a short descriptive PR body so reviewers can quickly understand the objectives.
✅ 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_202509201242

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 20, 2025 12:43
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai Sep 20, 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)

1-1: Fix duplicate operationId values in OpenAPI spec (src/libs/AI21/openapi.yaml)

Validation failed: prance/openapi-spec-validator raised DuplicateOperationIDError; spec header is openapi: 3.0.4.

  • v1_library_management — occurrences:

    • GET /studio/v1/library/files
    • GET /studio/v1/library/files/{file_id}
    • PUT /studio/v1/library/files/{file_id}
    • GET /studio/v1/library/batches/{batch_id}/status
    • GET /studio/v1/library/files/{file_id}/download
  • v1_secret_storage — occurrences:

    • GET /studio/v1/secrets
    • POST /studio/v1/secrets
    • DELETE /studio/v1/secrets
    • PATCH /studio/v1/secrets/{secret_id}

Action: make each operationId unique (include resource and/or method in the name), then re-run openapi-spec-validator/prance until the spec validates.

♻️ Duplicate comments (1)
src/libs/AI21/openapi.yaml (1)

3907-3960: LGTM: ModifyAssistantRequest aligns with shared enums and resources

Good use of $refs here. Please update CreateAssistantRequest similarly (see above).

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

1018-1043: Add UUID format + define a proper response schema

  • vector_store_id should likely be a UUID; add format: uuid.
  • The 200 response uses a generic object title. Prefer a concrete $ref (e.g., VectorStore) for client typing.

Proposed diff:

-        - name: vector_store_id
+        - name: vector_store_id
           in: path
           required: true
           schema:
             title: Vector Store Id
-            type: string
+            type: string
+            format: uuid
...
-              schema:
-                title: Response Get Vector Store Studio V1 Demos Regulations Vector Store  Vector Store Id  Get
-                type: object
+              schema:
+                $ref: '#/components/schemas/VectorStore'

And add this schema under components.schemas:

+    VectorStore:
+      title: VectorStore
+      type: object
+      properties:
+        id:
+          type: string
+          format: uuid
+        name:
+          type: string
+        created_at:
+          type: string
+          format: date-time
+        metadata:
+          type: object

1520-1541: Use 201 Created for resource creation

POST “Create Assistant” should return 201, not 200. Consider adding Location header too.

-      responses:
-        '200':
+      responses:
+        '201':
           description: Successful Response
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/Assistant'

1948-1969: Minor: Summary casing

Use “MCP Tool Discovery” (capitalize MCP) for consistency with schema names.

-      summary: Mcp Tool Discovery
+      summary: MCP Tool Discovery

2305-2308: Fix misleading description

vector_store_id here is under “regulations” upload; description says “RFI processing”. Align wording.

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

2723-2725: Naming consistency and defaults

  • max_documents uses snake_case while similar fields elsewhere use camelCase (e.g., maxNeighbors). Consider normalizing.
  • Response language default unset is fine; document semantics.
-        max_documents:
+        maxDocuments:
           title: Max Documents
           type: integer

Also applies to: 2727-2729, 2753-2756


2830-2872: Unify types with ModifyAssistantRequest and Assistant

  • optimization is a plain string here but ModifyAssistantRequest.optimization uses RunOptimization. Use the enum here too.
  • tool_resources is type: object here, but elsewhere you use AssistantToolResource. Use the same $ref.
-        optimization:
-          title: Optimization
-          type: string
+        optimization:
+          $ref: '#/components/schemas/RunOptimization'
...
-        tool_resources:
-          title: Tool Resources
-          type: object
+        tool_resources:
+          $ref: '#/components/schemas/AssistantToolResource'

2898-2901: LGTM: Stronger typing for tools/requirements + response_language default

This aligns Maestro runs with shared definitions. Consider also switching budget here to $ref: BudgetLevel for uniformity (non-blocking).

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

Also applies to: 2905-2909, 2943-2957


3307-3362: FileSearchToolResource polish: bounds + UUID formats

  • Add bounds to similarity thresholds where applicable (0.0–1.0).
  • file_ids items should be format: uuid if they are IDs.
  • Consider naming parity with other payloads (labels_filter_mode vs labelsFilterMode) — optional.
-        retrieval_similarity_threshold:
+        retrieval_similarity_threshold:
           title: Retrieval Similarity Threshold
           type: number
+          minimum: 0.0
+          maximum: 1.0
...
-        file_ids:
+        file_ids:
           title: File Ids
           type: array
           items:
-            type: string
+            type: string
+            format: uuid

3496-3500: Typo in schema name: Ignestion → Ingestion

Fix the schema name and its references to avoid public-facing typos.

-    IgnestionBatchStatusCount:
-      title: IgnestionBatchStatusCount
+    IngestionBatchStatusCount:
+      title: IngestionBatchStatusCount

And update references:

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

3674-3745: MCP schemas: add URI format + headers map typing

  • Add format: uri to server_url.
  • Type headers as a string map.
-        server_url:
+        server_url:
           title: Server Url
-          type: string
+          type: string
+          format: uri
...
-        headers:
+        headers:
           title: Headers
-          type: object
+          type: object
+          additionalProperties:
+            type: string

Apply similarly to MCPToolResource.headers.


3753-3761: LGTM: explicit error surface for MaestroRunResult

Good addition; consider documenting when error is present (e.g., status = failed) and marking it nullable if needed.

-        error:
+        error:
           $ref: '#/components/schemas/MaestroRunError'

Also applies to: 3790-3791


4118-4172: Parity with CreateMaestroRunsPayload.input

RunAssistantRequest.input only allows an array of Message. For parity/usability, consider allowing string too (as in CreateMaestroRunsPayload).

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

4638-4654: LGTM: Assistant Requirement object

Looks fine; if type has a known set, consider enumerating later.

📜 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 68ab925.

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

1590-1617: LGTM: PATCH shape and schema

PATCH surface and response look coherent with ModifyAssistantRequest.


1619-1647: Confirm sync vs async semantics

Run Assistant returns MaestroRunResult with status including in_progress. If execution is async, 202 Accepted is more accurate; if always sync, keep 200.

Would you like me to switch to 202 and document polling via GET /studio/v1/maestro/runs/{execution_id}?


2132-2132: Good: Tools now reference namespaced ToolDefinition

This improves polymorphism and alignment with discriminator usage.


2344-2349: LGTM: BudgetLevel enum

Consistent with usage across payloads.


2472-2472: LGTM: Chat tools use chat.ToolDefinition

Clear separation between chat tools and execution engine tools.


4348-4355: LGTM: ToolResource narrowed to runtime-relevant resources

Clear split vs execution engine tool definitions.


4655-4667: LGTM: chat.ToolDefinition

Matches ChatRequest discriminator usage.


4669-4684: LGTM: execution_engine.Requirement

Appropriate fields and optionality.


4685-4698: LGTM: oneOf + discriminator mapping

Discriminator on type with explicit mapping is correct and client-friendly.

Comment on lines +2136 to +2166
title: Requirements
type: array
items:
$ref: '#/components/schemas/language_studio_api_server__data_types__assistant__Requirement'
budget:
allOf:
- $ref: '#/components/schemas/BudgetLevel'
default: medium
visibility:
allOf:
- $ref: '#/components/schemas/Visibility'
default: public
assistant_type:
allOf:
- $ref: '#/components/schemas/AssistantType'
default: default
response_language:
title: Response Language
enum:
- arabic
- dutch
- english
- french
- german
- hebrew
- italian
- portuguese
- spanish
- unset
type: string
default: unset
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Default visibility = public is risky; consider private by default

Defaulting new assistants to public could expose configs or behaviors unintentionally. Safer default is private.

-        visibility:
+        visibility:
           allOf:
             - $ref: '#/components/schemas/Visibility'
-          default: public
+          default: private
📝 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: Requirements
type: array
items:
$ref: '#/components/schemas/language_studio_api_server__data_types__assistant__Requirement'
budget:
allOf:
- $ref: '#/components/schemas/BudgetLevel'
default: medium
visibility:
allOf:
- $ref: '#/components/schemas/Visibility'
default: public
assistant_type:
allOf:
- $ref: '#/components/schemas/AssistantType'
default: default
response_language:
title: Response Language
enum:
- arabic
- dutch
- english
- french
- german
- hebrew
- italian
- portuguese
- spanish
- unset
type: string
default: unset
title: Requirements
type: array
items:
$ref: '#/components/schemas/language_studio_api_server__data_types__assistant__Requirement'
budget:
allOf:
- $ref: '#/components/schemas/BudgetLevel'
default: medium
visibility:
allOf:
- $ref: '#/components/schemas/Visibility'
default: private
assistant_type:
allOf:
- $ref: '#/components/schemas/AssistantType'
default: default
response_language:
title: Response Language
enum:
- arabic
- dutch
- english
- french
- german
- hebrew
- italian
- portuguese
- spanish
- unset
type: string
default: unset
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 2136 to 2166, the visibility property
currently defaults to "public"; change the default to "private" by updating the
default value under visibility to private, ensure the allOf reference remains to
'#/components/schemas/Visibility', and run/update any unit/integration tests or
validation tooling that expect the old default; also search the repo for other
places assuming visibility default and update docs/fixtures to reflect the new
default.
Comment on lines +3402 to +3495
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: HTTPValidationError
type: object
properties:
detail:
title: Detail
type: array
items:
$ref: '#/components/schemas/ValidationError'
IgnestionBatchStatusCount:
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Schema bug: misplaced additionalProperties + headers typing

  • In HTTPToolFunctionParameters, additionalProperties: false is currently modeled as a property, not a schema constraint. Move it to the schema level.
  • HTTPToolEndpoint.headers should be a map of strings: additionalProperties: { type: string }.
  • Optional: HTTPToolFunctionParamProperties.type can be enumerated to known JSON types.
-    HTTPToolFunctionParameters:
+    HTTPToolFunctionParameters:
       title: HTTPToolFunctionParameters
       required:
         - properties
         - required
       type: object
+      additionalProperties: false
       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
-    HTTPToolEndpoint:
+    HTTPToolEndpoint:
       title: HTTPToolEndpoint
       required:
         - url
       type: object
       properties:
         url:
           title: Url
           type: string
         headers:
           title: Headers
-          type: object
+          type: object
+          additionalProperties:
+            type: string

Optional enum:

-    HTTPToolFunctionParamProperties:
+    HTTPToolFunctionParamProperties:
       title: HTTPToolFunctionParamProperties
       required:
         - type
         - description
       type: object
       properties:
         type:
           title: Type
-          type: string
+          type: string
+          enum: [string, number, integer, boolean, object, array]
         description:
           title: Description
           type: string
📝 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: HTTPValidationError
type: object
properties:
detail:
title: Detail
type: array
items:
$ref: '#/components/schemas/ValidationError'
IgnestionBatchStatusCount:
HTTPToolEndpoint:
title: HTTPToolEndpoint
required:
- url
type: object
properties:
url:
title: Url
type: string
headers:
title: Headers
type: object
additionalProperties:
type: string
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
enum:
- string
- number
- integer
- boolean
- object
- array
description:
title: Description
type: string
HTTPToolFunctionParameters:
title: HTTPToolFunctionParameters
required:
- properties
- required
type: object
additionalProperties: false
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
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: HTTPValidationError
type: object
properties:
detail:
title: Detail
type: array
items:
$ref: '#/components/schemas/ValidationError'
IgnestionBatchStatusCount:
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3402-3495, the schema has three
issues: in HTTPToolFunctionParameters move "additionalProperties: false" from
inside the properties block to the schema level (i.e., as a sibling to "type",
"properties", and "required"); change HTTPToolEndpoint.headers to be a map of
strings by adding an additionalProperties schema of type: string for headers;
and optionally restrict HTTPToolFunctionParamProperties.type to a JSON type enum
(e.g., enum: [string, number, integer, boolean, object, array, null]) to
explicitly enumerate allowed types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants