-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat:Add Assistant/MCP discovery, vector retrieval, and RunAssistantRequest #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds new Assistant and MCP discovery endpoints, vector store retrieval, expanded schemas for tools and resources (HTTP, MCP, file/web search), new enums, and updated references to a unified ToolDefinition. Introduces RunAssistantRequest, error propagation for Maestro runs, and extends request bodies with vector_store_id and response_language. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant API as Studio API
participant Store as Vector Store
Client->>API: GET /studio/v1/demos/regulations/vector-store/{id}
API->>Store: Fetch by vector_store_id
Store-->>API: VectorStore
API-->>Client: 200 VectorStore
sequenceDiagram
autonumber
actor Client
participant API as Studio API
participant Registry as Tool Registry
participant RunEng as Maestro Runner
rect rgba(230,245,255,0.5)
note over Client,API: Assistant lifecycle
Client->>API: POST /studio/v1/assistants (CreateAssistantRequest)
API-->>Client: 201 Assistant
Client->>API: PATCH /studio/v1/assistants/{assistant_id} (ModifyAssistantRequest)
API-->>Client: 200 Assistant
end
rect rgba(240,255,230,0.5)
note over Client,RunEng: Run flow
Client->>API: POST /studio/v1/assistants/{assistant_id}/run (RunAssistantRequest)
API->>Registry: Resolve tools/resources
API->>RunEng: Start run with input, tools, resources
alt success
RunEng-->>API: MaestroRunResult (output)
API-->>Client: 200 MaestroRunResult
else error
RunEng-->>API: MaestroRunResult.error (MaestroRunError)
API-->>Client: 200 MaestroRunResult with error
end
end
sequenceDiagram
autonumber
actor Client
participant API as Studio API
participant MCP as MCP Server
Client->>API: POST /studio/v1/mcp/discover (MCPDefinition)
API->>MCP: Connect using server_url, headers
MCP-->>API: Tools metadata (MCPTool[])
API-->>Client: 200 MCPDiscoveryResponse
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (10)
src/libs/AI21/openapi.yaml (10)
1018-1043
: Define a concrete VectorStore schema (and consider 404).Response is an untyped object. Add a VectorStore schema (id, name, size, created_at, etc.) and return it. Also consider a 404 for unknown vector_store_id.
- content: - application/json: - schema: - title: Response Get Vector Store Studio V1 Demos Regulations Vector Store Vector Store Id Get - type: object + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStore' + '404': + description: Not Found +components: + schemas: + VectorStore: + title: VectorStore + type: object + required: [id] + properties: + id: { title: Id, type: string } + name: { title: Name, type: string } + created_at: { title: Created At, type: string, format: date-time } + metadata: { title: Metadata, type: object }
1520-1541
: POST /assistants returns 200 — prefer 201 Created.Not blocking, but 201 aligns with REST semantics for resource creation.
- responses: - '200': - description: Successful Response + responses: + '201': + description: Created content: application/json: schema: $ref: '#/components/schemas/Assistant'
2723-2725
: ConversationalRagConfig tweaks — add bounds to similarity threshold.You set default 0 but no min/max; elsewhere (LibrarySearchRequest) you use 0.0–1.0. Add the same constraints here for consistency.
retrieval_similarity_threshold: title: Retrieval Similarity Threshold - type: number + type: number + minimum: 0.0 + maximum: 1.0 default: 0Also applies to: 2727-2729, 2753-2756
2895-2901
: CreateMaestroRunsPayload: unify types and reuse enums.
- tools now reference execution_engine ToolDefinition — good.
- tool_resources references ToolResource (only file/web; see separate comment).
- budget here is inline enum, elsewhere you use BudgetLevel. Prefer reusing BudgetLevel and a shared ResponseLanguage.
budget: - title: Budget - enum: [low, medium, high] - type: string + allOf: + - $ref: '#/components/schemas/BudgetLevel' response_language: - title: Response Language - enum: [arabic, dutch, english, french, german, hebrew, italian, portuguese, spanish, unset] - type: string - default: unset + $ref: '#/components/schemas/ResponseLanguage'Also applies to: 2905-2909, 2943-2957
3307-3362
: FileSearchToolResource: add similarity bounds and reuse ResponseLanguage.
- retrieval_similarity_threshold lacks 0–1 range.
- response_language duplicates enum.
retrieval_similarity_threshold: title: Retrieval Similarity Threshold - type: number + type: number + minimum: 0.0 + maximum: 1.0 ... - response_language: - title: Response Language - enum: [arabic, dutch, english, french, german, hebrew, italian, portuguese, spanish, unset] - type: string - default: unset + response_language: + $ref: '#/components/schemas/ResponseLanguage'
3496-3500
: Typo: IgnestionBatchStatusCount.Public name has a typo and is referenced by IngestionBatchStatusResponse.statuses. Add a correctly spelled alias and (optionally) deprecate the misspelled one to avoid a breaking change.
+ IngestionBatchStatusCount: + title: IngestionBatchStatusCount + required: [status, count] + type: object + properties: + status: { title: Status, type: string } + count: { title: Count, type: integer }Also switch IngestionBatchStatusResponse.statuses.items to the new schema:
- statuses: - title: Statuses - type: array - items: - $ref: '#/components/schemas/IgnestionBatchStatusCount' + statuses: + title: Statuses + type: array + items: + $ref: '#/components/schemas/IngestionBatchStatusCount'
3907-3960
: ModifyAssistantRequest — LGTM; use it to normalize Create/Assistant.This is the canonical shape (RunOptimization, AssistantToolResource, visibility/response_language). Please align CreateAssistantRequest and Assistant with this.
4118-4166
: RunAssistantRequest: allow string input (parity with CreateMaestroRunsPayload).CreateMaestroRunsPayload accepts input as array of Message or string; RunAssistantRequest only allows array. Consider supporting both for ergonomics.
properties: input: - title: Input - type: array - items: - $ref: '#/components/schemas/Message' + title: Input + anyOf: + - type: array + items: + $ref: '#/components/schemas/Message' + - type: string
2153-2166
: Deduplicate response_language across schemas.Define a shared ResponseLanguage enum and reference it everywhere.
+ ResponseLanguage: + title: ResponseLanguage + type: string + enum: [arabic, dutch, english, french, german, hebrew, italian, portuguese, spanish, unset] + default: unsetThen replace in Assistant, ConversationalRagConfig, CreateMaestroRunsPayload, FileSearchToolResource, ModifyAssistantRequest, RunAssistantRequest, etc.:
- response_language: - title: Response Language - enum: [...] - type: string - default: unset + response_language: + $ref: '#/components/schemas/ResponseLanguage'Also applies to: 2753-2756, 2954-2957, 3360-3362, 3949-3960
3934-3937
: Unify Assistant tool resource shapes.Assistant.tool_resources uses AssistantToolResource (generic objects), CreateMaestroRunsPayload.tool_resources uses ToolResource (typed sub-resources). Consider converging on ToolResource or make AssistantToolResource fields reference the specific sub-schemas to reduce ambiguity and improve codegen.
AssistantToolResource: properties: - file_search: - title: File Search - type: object - web_search: - title: Web Search - type: object + file_search: + $ref: '#/components/schemas/FileSearchToolResource' + web_search: + $ref: '#/components/schemas/WebSearchToolResource'Also applies to: 2858-2860, 4348-4355, 2229-2241
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ 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 (10)
src/libs/AI21/openapi.yaml (10)
2241-2247
: AssistantType enum — LGTM.
2304-2308
: vector_store_id added — LGTM.Name/description consistent with other bodies.
2344-2349
: BudgetLevel enum — LGTM.
3487-3495
: HTTPValidationError — LGTM.
3753-3761
: MaestroRunError and error surface — LGTM.Also applies to: 3790-3791
4348-4355
: ToolResource only includes file_search and web_search.Given ToolDefinition supports http and mcp, confirm whether tool_resources purposely exclude them (embedded in definitions) or if http/mcp resources are also needed here for orchestration.
4472-4477
: Visibility enum — LGTM.
4478-4495
: WebSearchToolResource — LGTM.
2472-2473
: ChatRequest.tools ref change — LGTM.Points to chat-specific ToolDefinition (function tools).
1948-1969
: MCP Discovery endpoint — LGTM.Shapes look consistent with the new MCP types (post-tightening headers/URL as noted).
post: | ||
summary: Run Assistant | ||
operationId: v1_run_assistant | ||
parameters: | ||
- name: assistant_id | ||
in: path | ||
required: true | ||
schema: | ||
title: Assistant Id | ||
type: string | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/RunAssistantRequest' | ||
required: true | ||
responses: | ||
'200': | ||
description: Successful Response | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/MaestroRunResult' | ||
'422': | ||
description: Validation Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/HTTPValidationError' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Run Assistant path — LGTM (after input parity change).
Please validate the spec compiles and operationIds remain unique:
🏁 Script executed:
#!/bin/bash
# Validate OpenAPI and list duplicate operationIds
python - << 'PY'
import json, sys, re
from collections import Counter
import yaml
spec = yaml.safe_load(open("src/libs/AI21/openapi.yaml"))
ops=[]
for path, item in spec.get("paths",{}).items():
for method, op in item.items():
if isinstance(op, dict) and "operationId" in op:
ops.append(op["operationId"])
dups=[k for k,v in Counter(ops).items() if v>1]
print("Duplicate operationIds:", dups)
PY
Length of output: 70
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python - <<'PY'
import yaml
from collections import defaultdict
spec = yaml.safe_load(open("src/libs/AI21/openapi.yaml"))
op_map = defaultdict(list)
for path, item in spec.get("paths", {}).items():
if not isinstance(item, dict):
continue
for method, op in item.items():
if isinstance(op, dict) and "operationId" in op:
op_map[op["operationId"]].append((path, method))
dups = {k:v for k,v in op_map.items() if len(v)>1}
if not dups:
print("No duplicate operationIds found")
else:
for opid, occ in sorted(dups.items()):
print(opid)
for p, m in occ:
print(f" - {p} [{m}]")
PY
Length of output: 407
Duplicate operationId values in src/libs/AI21/openapi.yaml — action required
OpenAPI contains non-unique operationId values (client generators/tooling require unique operationIds). Rename the operationIds and re-run validation.
-
v1_library_management
- /studio/v1/library/files [get]
- /studio/v1/library/files/{file_id} [get]
- /studio/v1/library/files/{file_id} [put]
- /studio/v1/library/batches/{batch_id}/status [get]
- /studio/v1/library/files/{file_id}/download [get]
-
v1_secret_storage
- /studio/v1/secrets [get]
- /studio/v1/secrets [post]
- /studio/v1/secrets [delete]
- /studio/v1/secrets/{secret_id} [patch]
Rename examples: use resource+verb or path segments (e.g., v1_library_files_list, v1_library_file_get, v1_secrets_create), then re-run the validation script.
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 1619-1647 the operationId
"v1_run_assistant" collides with other non-unique operationIds across the spec;
rename the operationId to a unique name following the suggested pattern (e.g.,
use resource+verb or path segments) and make equivalent unique renames for the
other duplicated ids listed in the review (for example change
v1_library_management entries to v1_library_files_list, v1_library_file_get,
v1_library_file_update, v1_library_batch_status_get,
v1_library_file_download_get and change v1_secret_storage entries to
v1_secrets_list, v1_secrets_create, v1_secrets_delete, v1_secret_patch); update
each operationId value in the YAML accordingly and re-run the OpenAPI validation
script.
$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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assistant schema: align types and reuse enums.
- tools now reference execution_engine ToolDefinition — good.
- optimization remains a free-form string in Assistant (Line 2103) while ModifyAssistantRequest uses RunOptimization. Make Assistant.optimization also RunOptimization.
- response_language enum duplicates elsewhere; consider centralizing (see comment below).
properties:
optimization:
- title: Optimization
- type: string
+ $ref: '#/components/schemas/RunOptimization'
Also applies to: 2141-2166
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 2132-2140 (and also apply the same
change to lines 2141-2166), update the Assistant schema so its optimization
property uses the existing RunOptimization enum/type instead of a free-form
string, and replace any locally-declared response_language enum with a reference
to the centralized response_language enum definition (or move the enum to
components/schemas and reference it) so the types are reused consistently across
ModifyAssistantRequest and Assistant.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CreateAssistantRequest inconsistencies (must fix).
- tool_resources is typed generic object, but Assistant/Modify use AssistantToolResource.
- optimization is free string here; Modify uses RunOptimization.
- visibility and response_language are absent here but present on Assistant/Modify.
properties:
optimization:
- title: Optimization
- type: string
+ $ref: '#/components/schemas/RunOptimization'
tool_resources:
- title: Tool Resources
- type: object
+ $ref: '#/components/schemas/AssistantToolResource'
+ visibility:
+ $ref: '#/components/schemas/Visibility'
+ response_language:
+ title: Response Language
+ $ref: '#/components/schemas/ResponseLanguage'
Would you like me to push a follow-up patch adding ResponseLanguage (see below) and wiring it here and in other places?
📝 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.
title: CreateAssistantRequest | |
required: | |
- name | |
type: object | |
properties: | |
name: | |
title: Name | |
type: string | |
description: | |
title: Description | |
type: string | |
optimization: | |
title: Optimization | |
type: string | |
avatar: | |
title: Avatar | |
type: string | |
models: | |
title: Models | |
type: array | |
items: | |
type: string | |
tools: | |
title: Tools | |
type: array | |
items: | |
$ref: '#/components/schemas/language_studio_api_server__data_types__execution_engine__ToolDefinition' | |
tool_resources: | |
title: Tool Resources | |
type: object | |
requirements: | |
title: Requirements | |
type: array | |
items: | |
$ref: '#/components/schemas/language_studio_api_server__data_types__assistant__Requirement' | |
budget: | |
allOf: | |
- $ref: '#/components/schemas/BudgetLevel' | |
default: medium | |
assistant_type: | |
allOf: | |
- $ref: '#/components/schemas/AssistantType' | |
default: default | |
title: CreateAssistantRequest | |
required: | |
- name | |
type: object | |
properties: | |
name: | |
title: Name | |
type: string | |
description: | |
title: Description | |
type: string | |
optimization: | |
$ref: '#/components/schemas/RunOptimization' | |
avatar: | |
title: Avatar | |
type: string | |
models: | |
title: Models | |
type: array | |
items: | |
type: string | |
tools: | |
title: Tools | |
type: array | |
items: | |
$ref: '#/components/schemas/language_studio_api_server__data_types__execution_engine__ToolDefinition' | |
tool_resources: | |
$ref: '#/components/schemas/AssistantToolResource' | |
visibility: | |
$ref: '#/components/schemas/Visibility' | |
response_language: | |
title: Response Language | |
$ref: '#/components/schemas/ResponseLanguage' | |
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: 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTTP tool shapes: tighten URL/header typing.
- Mark URLs as format: uri.
- headers are plain object; set additionalProperties: string for codegen safety.
HTTPToolEndpoint:
properties:
url:
title: Url
- type: string
+ type: string
+ format: uri
headers:
- title: Headers
- type: object
+ title: Headers
+ type: object
+ additionalProperties:
+ type: string
MCPToolResource (headers similar pattern if applicable)
📝 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.
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 | |
format: uri | |
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 | |
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: |
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3402 to 3486, the
HTTPToolEndpoint.url schema should be marked as format: uri and the headers
schema should be tightened so codegen treats header values as strings; update
the url property to include format: uri and change headers from a bare object to
an object schema with additionalProperties set to type: string (i.e., ensure
headers: type: object and additionalProperties: { type: string }) so tooling
generates safe string-valued header maps.
title: MCPDefinition | ||
required: | ||
- server_url | ||
type: object | ||
properties: | ||
server_url: | ||
title: Server Url | ||
type: string | ||
server_label: | ||
title: Server Label | ||
type: string | ||
headers: | ||
title: Headers | ||
type: object | ||
MCPDiscoveryResponse: | ||
title: MCPDiscoveryResponse | ||
required: | ||
- mcp_definition | ||
- tools | ||
type: object | ||
properties: | ||
mcp_definition: | ||
$ref: '#/components/schemas/MCPDefinition' | ||
tools: | ||
title: Tools | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/MCPTool' | ||
MCPTool: | ||
title: MCPTool | ||
required: | ||
- name | ||
- inputSchema | ||
type: object | ||
properties: | ||
name: | ||
title: Name | ||
type: string | ||
description: | ||
title: Description | ||
type: string | ||
inputSchema: | ||
title: Inputschema | ||
type: object | ||
MCPToolResource: | ||
title: MCPToolResource | ||
required: | ||
- server_label | ||
- server_url | ||
type: object | ||
properties: | ||
type: | ||
title: Type | ||
enum: | ||
- mcp | ||
type: string | ||
default: mcp | ||
server_label: | ||
title: Server Label | ||
type: string | ||
server_url: | ||
title: Server Url | ||
type: string | ||
headers: | ||
title: Headers | ||
type: object | ||
allowed_tools: | ||
title: Allowed Tools | ||
type: array | ||
items: | ||
type: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MCP types: tighten URL/header typing and consider allowed_tools format.
- Add format: uri for server_url.
- headers should be a string map.
MCPDefinition:
properties:
server_url:
- type: string
+ type: string
+ format: uri
headers:
- type: object
+ type: object
+ additionalProperties:
+ type: string
MCPToolResource:
properties:
server_url:
- type: string
+ type: string
+ format: uri
headers:
- type: object
+ type: object
+ additionalProperties:
+ 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.
title: MCPDefinition | |
required: | |
- server_url | |
type: object | |
properties: | |
server_url: | |
title: Server Url | |
type: string | |
server_label: | |
title: Server Label | |
type: string | |
headers: | |
title: Headers | |
type: object | |
MCPDiscoveryResponse: | |
title: MCPDiscoveryResponse | |
required: | |
- mcp_definition | |
- tools | |
type: object | |
properties: | |
mcp_definition: | |
$ref: '#/components/schemas/MCPDefinition' | |
tools: | |
title: Tools | |
type: array | |
items: | |
$ref: '#/components/schemas/MCPTool' | |
MCPTool: | |
title: MCPTool | |
required: | |
- name | |
- inputSchema | |
type: object | |
properties: | |
name: | |
title: Name | |
type: string | |
description: | |
title: Description | |
type: string | |
inputSchema: | |
title: Inputschema | |
type: object | |
MCPToolResource: | |
title: MCPToolResource | |
required: | |
- server_label | |
- server_url | |
type: object | |
properties: | |
type: | |
title: Type | |
enum: | |
- mcp | |
type: string | |
default: mcp | |
server_label: | |
title: Server Label | |
type: string | |
server_url: | |
title: Server Url | |
type: string | |
headers: | |
title: Headers | |
type: object | |
allowed_tools: | |
title: Allowed Tools | |
type: array | |
items: | |
type: string | |
title: MCPDefinition | |
required: | |
- server_url | |
type: object | |
properties: | |
server_url: | |
title: Server Url | |
type: string | |
format: uri | |
server_label: | |
title: Server Label | |
type: string | |
headers: | |
title: Headers | |
type: object | |
additionalProperties: | |
type: string | |
MCPDiscoveryResponse: | |
title: MCPDiscoveryResponse | |
required: | |
- mcp_definition | |
- tools | |
type: object | |
properties: | |
mcp_definition: | |
$ref: '#/components/schemas/MCPDefinition' | |
tools: | |
title: Tools | |
type: array | |
items: | |
$ref: '#/components/schemas/MCPTool' | |
MCPTool: | |
title: MCPTool | |
required: | |
- name | |
- inputSchema | |
type: object | |
properties: | |
name: | |
title: Name | |
type: string | |
description: | |
title: Description | |
type: string | |
inputSchema: | |
title: Inputschema | |
type: object | |
MCPToolResource: | |
title: MCPToolResource | |
required: | |
- server_label | |
- server_url | |
type: object | |
properties: | |
type: | |
title: Type | |
enum: | |
- mcp | |
type: string | |
default: mcp | |
server_label: | |
title: Server Label | |
type: string | |
server_url: | |
title: Server Url | |
type: string | |
format: uri | |
headers: | |
title: Headers | |
type: object | |
additionalProperties: | |
type: string | |
allowed_tools: | |
title: Allowed Tools | |
type: array | |
items: | |
type: string |
🤖 Prompt for AI Agents
In src/libs/AI21/openapi.yaml around lines 3674–3744, tighten the MCP schemas by
(1) adding format: uri to all server_url schema entries
(MCPDefinition.server_url and MCPToolResource.server_url) so they validate as
URIs, (2) replace the loose headers: type: object with a string-keyed map by
using headers: type: object and add additionalProperties: { type: string } to
enforce string header values, and (3) ensure allowed_tools is explicitly an
array of strings (it currently is) and optionally add uniqueItems: true if
duplicate tool names should be prevented.
Summary by CodeRabbit