Skip to content

Conversation

HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 17, 2025

Summary by CodeRabbit

  • New Features

    • Assistants API: create, update, and run assistants with new options (structured RAG, dynamic planning, response language).
    • MCP tool discovery endpoint for detecting available tools.
    • Vector store retrieval by ID.
    • Expanded tool integrations: HTTP, Web Search, and File Search tools.
    • Assistant enhancements: set type, visibility, budget, and retrieval strategies.
  • Refactor

    • Unified, data-type–driven tool model across endpoints, aligning payloads and defaults for a more consistent API experience.

Copy link

coderabbitai bot commented Sep 17, 2025

Walkthrough

OpenAPI spec updated to add multiple endpoints (assistants create/modify/run, MCP discovery, vector-store fetch), introduce new request/response schemas and enums, refactor tool model to a data-type driven structure, extend Assistant fields, adjust Maestro payload references, and add minor parameter augmentations.

Changes

Cohort / File(s) Summary
New endpoints
src/libs/AI21/openapi.yaml
Added: GET /studio/v1/demos/regulations/vector-store/{vector_store_id}; POST /studio/v1/assistants; PATCH /studio/v1/assistants/{assistant_id}; POST /studio/v1/assistants/{assistant_id}/run; POST /studio/v1/mcp/discover.
Assistants API schemas
src/libs/AI21/openapi.yaml
Added CreateAssistantRequest, ModifyAssistantRequest, RunAssistantRequest; Assistant schema extended with requirements, budget, visibility, assistant_type; RunAssistantRequest supports structured options; Added RunOptimization enum.
Tool model refactor (data-type driven)
src/libs/AI21/openapi.yaml
Replaced ToolDefinition with language_studio_api_server__data_types__execution_engine__ToolDefinition (oneOf HTTPToolResource, MCPToolResource, FileSearchToolResource, WebSearchToolResource); renamed ToolResources→ToolResource; added HTTPToolEndpoint/Function/Parameters schemas; AssistantTool enum expanded to include rag; AssistantToolResource introduced.
MCP integration
src/libs/AI21/openapi.yaml
Added MCPDefinition, MCPDiscoveryResponse, MCPTool, MCPToolResource; new POST /studio/v1/mcp/discover endpoint.
Maestro payload updates
src/libs/AI21/openapi.yaml
MaestroRunPayload.tools now reference execution_engine ToolDefinition; maestro tool_resources now use ToolResource.
Internal data-type schemas
src/libs/AI21/openapi.yaml
Added language_studio_api_server__data_types__assistant__Requirement, ...__execution_engine__Requirement, ...__chat__ToolDefinition, ...__execution_engine__ToolDefinition; updated references accordingly.
Misc augmentations
src/libs/AI21/openapi.yaml
Body_upload_check_compliance now includes vector_store_id; Body_v1_library_upload includes BudgetLevel; Added enums: AssistantType, BudgetLevel, Visibility, RetrievalStrategy; Added FileSearchToolResource and WebSearchToolResource.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Client
  participant API as Studio API
  participant Assist as Assistants Service
  participant Exec as Execution Engine
  participant Tools as Tool Resources
  participant VS as Vector Store

  rect rgba(230,240,255,0.5)
  note over Client,API: Assistant lifecycle
  Client->>API: POST /studio/v1/assistants (CreateAssistantRequest)
  API->>Assist: Create Assistant
  Assist-->>API: Assistant
  API-->>Client: Assistant
  Client->>API: PATCH /studio/v1/assistants/{id} (ModifyAssistantRequest)
  API->>Assist: Modify Assistant
  Assist-->>API: Assistant
  API-->>Client: Assistant
  end

  rect rgba(240,255,230,0.5)
  note over Client,Exec: Run flow (tools via new data-type model)
  Client->>API: POST /studio/v1/assistants/{id}/run (RunAssistantRequest)
  API->>Exec: Start run (MaestroRunPayload with ToolDefinition oneOf)
  alt Tool = HTTP/MCP/FileSearch/WebSearch
    Exec->>Tools: Invoke tool (discriminated by type)
    Tools-->>Exec: Tool result
  end
  opt Retrieval strategy
    Exec->>VS: Fetch segments/docs (RetrievalStrategy)
    VS-->>Exec: Retrieved content
  end
  Exec-->>API: MaestroRunResult
  API-->>Client: MaestroRunResult
  end
Loading
sequenceDiagram
  autonumber
  participant Client
  participant API as Studio API
  participant MCP as MCP Discovery

  rect rgba(255,245,230,0.6)
  note over Client,MCP: MCP tool discovery
  Client->>API: POST /studio/v1/mcp/discover (MCPDefinition)
  API->>MCP: Discover tools
  MCP-->>API: MCPDiscoveryResponse (MCPTool list/resources)
  API-->>Client: MCPDiscoveryResponse
  end
Loading
sequenceDiagram
  autonumber
  participant Client
  participant API as Studio API
  participant Reg as Regulations Service
  participant VS as Vector Store

  note over Client,VS: Vector store fetch
  Client->>API: GET /studio/v1/demos/regulations/vector-store/{vector_store_id}
  API->>Reg: Resolve vector store
  Reg->>VS: Fetch by ID
  VS-->>Reg: Vector store
  Reg-->>API: 200/422
  API-->>Client: VectorStore or error
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

I thump my paws—new paths abound,
Assistants run with tools unbound.
MCPs discovered, vectors found,
Budgets, vis’, and types now crowned.
One spec to rule this bustling ground—
I nibble docs; the carrots sound. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The PR title "feat:@coderabbitai" is non-descriptive and does not convey the primary changes in this changeset (new assistants and MCP endpoints, a tool-model refactor, and many OpenAPI schema additions), so it is unclear to reviewers and to history. Please update the title to a concise, descriptive summary of the main change (for example: "feat(openapi): add assistants and MCP endpoints; refactor tool model" or "feat: add assistants endpoints and overhaul tool model in OpenAPI") so reviewers can understand the intent at a glance.
✅ 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_202509171524

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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 17, 2025 15:24
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:OpenAPI: add assistants, MCP, vector-store endpoints; refactor tools Sep 17, 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

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

1018-1043: Add format and 404 to vector-store endpoint.

  • Path param should declare a format (uuid?) to aid validation.
  • Consider adding a 404 response for unknown vector_store_id.

Apply:

       parameters:
         - name: vector_store_id
           in: path
           required: true
           schema:
             title: Vector Store Id
-            type: string
+            type: string
+            format: uuid
       responses:
         '200':
           description: Successful Response
@@
-        '422':
+        '404':
+          description: Not Found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/HTTPValidationError'
+        '422':
           description: Validation Error

2216-2222: AssistantTool: added 'rag' — confirm semantics vs 'file_search'.

If 'rag' is a distinct capability, document how it interacts with file_search; if redundant, avoid duplicate types.


2301-2304: Fix copy text in compliance upload schema.

Description references “RFI processing” on a regulations endpoint.

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

2340-2345: Use BudgetLevel where “budget” appears.

Now that BudgetLevel exists, align budget fields (e.g., Body_process_rfi_document, Body_upload_check_compliance) to reference it and use lowercase defaults.

-        budget:
-          title: Budget
-          type: string
-          description: 'Budget level: LOW, MEDIUM, or HIGH'
-          default: MEDIUM
+        budget:
+          title: Budget
+          allOf:
+            - $ref: '#/components/schemas/BudgetLevel'
+          default: medium

2719-2752: ConversationalRagConfig tweaks — add bounds and clarity.

  • max_documents lacks minimum; add minimum: 1 (and optional default).
  • response_language ‘unset’ default is fine; document behavior of ‘unset’.
         max_documents:
           title: Max Documents
           type: integer
+          minimum: 1
+          default: 10

3305-3360: FileSearchToolResource: add bounds and formats.

  • retrieval_similarity_threshold should be 0.0–1.0 to match other places.
  • max_neighbors should have minimum: 0 or 1.
  • file_ids may be UUIDs; consider format: uuid for consistency.
         retrieval_similarity_threshold:
           title: Retrieval Similarity Threshold
-          type: number
+          type: number
+          minimum: 0.0
+          maximum: 1.0
@@
         file_ids:
           title: File Ids
           type: array
           items:
-            type: string
+            type: string
+            format: uuid
@@
         max_neighbors:
           title: Max Neighbors
           type: integer
+          minimum: 0

3672-3742: MCP types — OK; consider naming consistency.

inputSchema uses camelCase while most schemas are snake_case; align if possible.

-        inputSchema:
+        input_schema:
           title: Inputschema
           type: object

3894-3935: Inconsistent optimization typing and missing assistant_type on modify.

  • ModifyAssistantRequest.optimization uses RunOptimization enum, but Assistant.optimization is plain string and CreateAssistantRequest.optimization is string. Align all three.
  • Consider allowing assistant_type updates on modify for symmetry.
-        optimization:
-          $ref: '#/components/schemas/RunOptimization'
+        optimization:
+          $ref: '#/components/schemas/RunOptimization'
+        # Also update Assistant.optimization and CreateAssistantRequest.optimization to use RunOptimization
+        # (apply in their respective schemas)
@@
+        assistant_type:
+          allOf:
+            - $ref: '#/components/schemas/AssistantType'

4447-4470: Visibility/WebSearchToolResource — OK; consider URL format.

Optionally add format: uri for urls items.

         urls:
           title: Urls
           type: array
           items:
-            type: string
+            type: string
+            format: uri
📜 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 db10c5a.

⛔ Files ignored due to path filters (132)
  • 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.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.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.AssistantTool2.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.CreateAssistantRequestTool.Json.g.cs is excluded by !**/generated/**
  • src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestTool.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.ModifyAssistantRequestTool.Json.g.cs is excluded by !**/generated/**
  • src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequestTool.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 (13)
src/libs/AI21/openapi.yaml (13)

1521-1541: Assistants: create endpoint — OK.

Operation surface looks consistent with the new Assistant schema.


1590-1617: Assistants: modify endpoint — OK.

Shape and 200 payload align with Assistant.


1619-1647: Assistants: run endpoint — OK.

Returns MaestroRunResult; input via RunAssistantRequest is coherent.


1948-1969: MCP discovery endpoint — OK.

Types are introduced below and referenced correctly.


2138-2153: Assistant: newly added fields — OK, but verify server defaults.

New defaults (budget=medium, visibility=public, assistant_type=default) must match backend defaults to avoid drift.


2238-2243: AssistantType enum — OK.

Values look fine; ensure downstream routing supports 'maestro'.


2465-2469: ChatRequest.tools ref swap — OK.

Refactoring to chat ToolDefinition (function-only) is consistent.


2896-2907: Maestro payload tool refactors — OK.

  • tools oneOf with discriminator works.
  • tool_resources now uses ToolResource — good separation from AssistantToolResource.

3468-3483: HTTPToolResource — OK, pending endpoint.method addition.

Structure looks fine; will rely on the endpoint fix above.


4093-4142: RunAssistantRequest — OK; dotted include keys.

Defaults include dotted paths; ensure backend tolerates dotted members in include list.


4143-4147: RunOptimization enum — OK.


4323-4330: ToolResource — OK.

Separation from AssistantToolResource is clear; only Maestro payloads use this.


4613-4673: oneOf + discriminator mapping — OK; verify uniqueness.

Mappings correctly match each schema’s type; ensure no other tools reuse the same type values.

Comment on lines +2826 to +2870
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:
type: object
additionalProperties:
$ref: '#/components/schemas/AssistantTool'
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: add visibility; fix tool_resources typing.

  • Missing visibility although Assistant has it and Modify allows it.
  • tool_resources should reference AssistantToolResource, not a raw object.
     CreateAssistantRequest:
@@
-        tool_resources:
-          title: Tool Resources
-          type: object
+        tool_resources:
+          $ref: '#/components/schemas/AssistantToolResource'
@@
+        visibility:
+          allOf:
+            - $ref: '#/components/schemas/Visibility'
+          default: public
📝 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:
type: object
additionalProperties:
$ref: '#/components/schemas/AssistantTool'
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:
type: object
additionalProperties:
$ref: '#/components/schemas/AssistantTool'
tool_resources:
$ref: '#/components/schemas/AssistantToolResource'
visibility:
allOf:
- $ref: '#/components/schemas/Visibility'
default: public
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 2826 to 2870, the
CreateAssistantRequest schema is missing the visibility field and tool_resources
is incorrectly typed as a raw object; add a visibility property that uses the
existing AssistantVisibility/AssistantType schema (matching how Assistant/Modify
use it) and add/replace tool_resources so it is an object whose
additionalProperties $ref points to '#/components/schemas/AssistantToolResource'
(ensuring defaults or enums match the existing Assistant schema where
applicable).

Comment on lines +3400 to +3467
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:
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

HTTP tool model: missing HTTP method and body spec.

HTTPToolEndpoint lacks method; without it, behavior is ambiguous. Consider adding method and optional body schema reference.

     HTTPToolEndpoint:
@@
       properties:
         url:
           title: Url
           type: string
+        method:
+          title: Method
+          enum: [GET, POST, PUT, PATCH, DELETE]
+          type: string
         headers:
           title: Headers
           type: object
📝 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:
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:
title: Additionalproperties
type: boolean
default: false
HTTPToolResource:
title: HTTPToolEndpoint
required:
- url
type: object
properties:
url:
title: Url
type: string
method:
title: Method
enum: [GET, POST, PUT, PATCH, DELETE]
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:
title: Additionalproperties
type: boolean
default: false
HTTPToolResource:
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3400 to 3467, the HTTPToolEndpoint
schema only defines url and headers and is missing the HTTP method and optional
request body specification; add a "method" property (enum of standard HTTP verbs
like GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD) and an optional "body"
property that references a new or existing request-body schema (or an arbitrary
JSON schema) and update required/description accordingly so callers can
unambiguously specify the HTTP verb and payload.

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