Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import "./main.tsp";

using Azure.ClientGenerator.Core;

@clientNamespace("Azure.AI.Agents")
namespace Azure.AI.Projects;
using Azure.AI.Projects;

namespace Customizations;

@@clientNamespace(Azure.AI.Projects, "Azure.AI.Agents", "csharp");
@@clientNamespace(Azure.AI.Projects, "com.azure.ai.agents", "java");

// ------------------------------------------------------------------------------------------------
// Operation scope customizations - don't generate Responses. We will use OpenAI client for those
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This project only exists for client library generation.
See parent directory for service API examples.
15 changes: 15 additions & 0 deletions specification/ai-foundry/Azure.AI.Projects/SDK-Agents/main.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import "@typespec/http";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";

import "../common/service.tsp";

import "../agents/operations.tsp";
import "../memory_stores/operations.tsp";
// We don't need the operations for these subclients, just the models
// so we can customize visibility where necessary.
import "../responses/operations.tsp";
import "../conversations/operations.tsp";

namespace Azure.AI.Projects;
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- tool: TypeSpecValidation
paths:
- tspconfig.yaml
rules:
- SdkTspConfigValidation
sub-rules:
# Suppress validation for a Go emitter options
- options.@azure-tools/typespec-go.containing-module
- options.@azure-tools/typespec-go.emitter-output-dir
- options.@azure-tools/typespec-go.module
- options.@azure-tools/typespec-go.generate-fakes
- options.@azure-tools/typespec-go.inject-spans
- options.@azure-tools/typespec-go.service-dir
- options.@azure-tools/typespec-go.package-dir
# Suppress JS package
- options.@azure-tools/typespec-ts.package-dir
- options.@azure-tools/typespec-ts.package-details.name
- options.@azure-tools/typespec-ts.emitter-output-dir
- options.@azure-tools/typespec-ts.package-details.name
# Suppress Python package
- options.@azure-tools/typespec-python.emitter-output-dir
reason: "See above comments for details"
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
parameters:
"service-dir":
default: "sdk/ai"
emit:
- "@azure-tools/typespec-autorest"
options:
"@azure-tools/typespec-autorest":
emitter-output-dir: "{project-root}/../.."
azure-resource-provider-folder: "data-plane"
emit-lro-options: "none"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azure-ai-agents-sdk.json"
omit-unreachable-types: true
"@typespec/http-client-csharp":
emitter-output-dir: "{output-dir}/{service-dir}/{package-name}"
package-name: Azure.AI.Agents
api-version: "2025-11-15-preview"
"@azure-tools/typespec-csharp":
emitter-output-dir: "{output-dir}/{service-dir}/{package-name}"
package-name: Azure.AI.Agents.Contracts.V2
namespace: Azure.AI.Agents.Contracts.V2
clear-output-folder: true
flavor: azure
"@azure-tools/typespec-java":
api-version: "2025-11-15-preview"
package-dir: "azure-ai-agents"
namespace: "com.azure.ai.agents"
service-name: "Agents"
partial-update: true
enable-sync-stack: true
generate-tests: false
generate-samples: false
custom-types-subpackage: "implementation.models"
customization-class: customizations/src/main/java/AgentsCustomizations.java
flavor: azure
"@azure-tools/typespec-client-generator-cli":
additionalDirectories:
- "specification/ai-foundry/data-plane/Azure.AI.Projects/.external-readonly/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/agents/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/common/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/connections/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/datasets/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/indexes/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/deployments/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/red-teams/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/evaluationrules/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/openai-evaluations/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/evaluation_taxonomies/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/evaluators/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/insights/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/schedules/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/memory_stores/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/conversations/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/responses/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/tools/"
linter:
extends:
- "@azure-tools/typespec-azure-rulesets/data-plane"
disable:
"@azure-tools/typespec-azure-core/casing-style": "Since we have many names in the form XxxxAIXxxx"
"@azure-tools/typespec-azure-core/no-string-discriminator": "Use an extensible union instead of a plain string"
"@azure-tools/typespec-azure-core/bad-record-type": "We do want to use Record<unknown>, and not Record<string>. But this needs further investigation"
"@azure-tools/typespec-azure-core/use-standard-names": "PUT operations that return 200 should start with 'replace' or 'createOrReplace'"
# The set of rules, disabled because of .external-readonly contains non compliant code.
"@azure-tools/typespec-azure-core/documentation-required": "Some OpenAI models do not contain docstrings."
"@azure-tools/typespec-azure-core/no-nullable": "Some OpenAI models still contain <> | null notation."
"@azure-tools/typespec-azure-core/no-closed-literal-union": "OpenAI incompliance"
"@azure-tools/typespec-azure-core/no-openapi": ".external-readonly uses OpenAI."
"@azure-tools/typespec-azure-core/no-multiple-discriminator": "OpenAI contains multiple discriminators."
"@azure-tools/typespec-azure-core/no-unknown": "unknowns are used in OpenAI package."
"@azure-tools/typespec-azure-core/no-query-explode": "Explode is used in OpenAI package."
"@azure-tools/typespec-client-generator-core/property-name-conflict": "OpenAI package has conflict."
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import "@azure-tools/typespec-client-generator-core";
import "./main.tsp";

using Azure.ClientGenerator.Core;
namespace Azure.AI.Projects;
using Azure.AI.Projects;

namespace Customizations;

// --------------------------------------------------------------------------------
// Root client
Expand Down Expand Up @@ -118,3 +120,6 @@ namespace Azure.AI.Projects;
"operationStatus",
"csharp"
);

// The fix for ambiguous import of OperationState
@@clientName(Azure.Core.Foundations.OperationState, "operationStatus", "java");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This project only exists for client library generation.
See parent directory for service API examples.
20 changes: 20 additions & 0 deletions specification/ai-foundry/Azure.AI.Projects/SDK-Projects/main.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import "@typespec/http";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";

import "../common/service.tsp";

import "../connections/routes.tsp";
import "../datasets/routes.tsp";
import "../indexes/routes.tsp";
import "../deployments/routes.tsp";
import "../red-teams/routes.tsp";
import "../evaluationrules/routes.tsp";
import "../openai-evaluations/routes.tsp";
import "../evaluation_taxonomies/routes.tsp";
import "../evaluators/routes.tsp";
import "../insights/routes.tsp";
import "../schedules/routes.tsp";

namespace Azure.AI.Projects;
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- tool: TypeSpecValidation
paths:
- tspconfig.yaml
rules:
- SdkTspConfigValidation
sub-rules:
# Suppress validation for a Go emitter options
- options.@azure-tools/typespec-go.containing-module
- options.@azure-tools/typespec-go.emitter-output-dir
- options.@azure-tools/typespec-go.module
- options.@azure-tools/typespec-go.generate-fakes
- options.@azure-tools/typespec-go.inject-spans
- options.@azure-tools/typespec-go.service-dir
- options.@azure-tools/typespec-go.package-dir
# Suppress JS package
- options.@azure-tools/typespec-ts.package-dir
- options.@azure-tools/typespec-ts.package-details.name
- options.@azure-tools/typespec-ts.emitter-output-dir
- options.@azure-tools/typespec-ts.package-details.name
# Suppress Python package
- options.@azure-tools/typespec-python.emitter-output-dir
reason: "See above comments for details"
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
parameters:
"service-dir":
default: "sdk/ai"
emit:
- "@azure-tools/typespec-autorest"
options:
"@azure-tools/typespec-autorest":
emitter-output-dir: "{project-root}/../.."
azure-resource-provider-folder: "data-plane"
emit-lro-options: "none"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azure-ai-projects-sdk.json"
omit-unreachable-types: true
"@typespec/http-client-csharp":
emitter-output-dir: "{output-dir}/{service-dir}/{package-name}"
package-name: Azure.AI.Projects
api-version: "2025-11-15-preview"
"@azure-tools/typespec-csharp":
emitter-output-dir: "{output-dir}/{service-dir}/{package-name}"
package-name: Azure.AI.Projects.Contracts.V2
namespace: Azure.AI.Projects.Contracts.V2
clear-output-folder: true
flavor: azure
"@azure-tools/typespec-java":
api-version: "2025-11-15-preview"
emitter-output-dir: "{output-dir}/{service-dir}/azure-ai-projects"
namespace: "com.azure.ai.projects"
service-name: "Projects"
partial-update: true
enable-sync-stack: true
generate-tests: false
generate-samples: false
custom-types-subpackage: "implementation.models"
customization-class: customizations/src/main/java/ProjectsCustomizations.java
flavor: azure
"@azure-tools/typespec-client-generator-cli":
additionalDirectories:
- "specification/ai-foundry/data-plane/Azure.AI.Projects/.external-readonly/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/agents/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/common/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/connections/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/datasets/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/indexes/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/deployments/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/red-teams/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/evaluationrules/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/openai-evaluations/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/evaluation_taxonomies/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/evaluators/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/insights/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/schedules/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/memory_stores/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/conversations/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/responses/"
- "specification/ai-foundry/data-plane/Azure.AI.Projects/tools/"
linter:
extends:
- "@azure-tools/typespec-azure-rulesets/data-plane"
disable:
"@azure-tools/typespec-azure-core/casing-style": "Since we have many names in the form XxxxAIXxxx"
"@azure-tools/typespec-azure-core/no-string-discriminator": "Use an extensible union instead of a plain string"
"@azure-tools/typespec-azure-core/bad-record-type": "We do want to use Record<unknown>, and not Record<string>. But this needs further investigation"
"@azure-tools/typespec-azure-core/use-standard-names": "PUT operations that return 200 should start with 'replace' or 'createOrReplace'"
# The set of rules, disabled because of .external-readonly contains non compliant code.
"@azure-tools/typespec-azure-core/documentation-required": "Some OpenAI models do not contain docstrings."
"@azure-tools/typespec-azure-core/no-nullable": "Some OpenAI models still contain <> | null notation."
"@azure-tools/typespec-azure-core/no-closed-literal-union": "OpenAI incompliance"
"@azure-tools/typespec-azure-core/no-openapi": ".external-readonly uses OpenAI."
"@azure-tools/typespec-azure-core/no-multiple-discriminator": "OpenAI contains multiple discriminators."
"@azure-tools/typespec-azure-core/no-unknown": "unknowns are used in OpenAI package."
"@azure-tools/typespec-azure-core/no-query-explode": "Explode is used in OpenAI package."
"@azure-tools/typespec-client-generator-core/property-name-conflict": "OpenAI package has conflict."
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import "@typespec/openapi";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";

namespace Azure.AI.Projects;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import "@typespec/http";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";

using TypeSpec.Http;
using TypeSpec.Versioning;
Expand Down Expand Up @@ -48,4 +47,12 @@ namespace Azure.AI.Projects {
@doc("Azure AI API version v1.")
v1: "v1",
}

scalar integer extends OpenAI.integer;
scalar numeric extends OpenAI.numeric;
}

namespace OpenAI {
scalar integer extends TypeSpec.int64;
scalar numeric extends TypeSpec.float64;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import "@azure-tools/typespec-autorest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "../common/models.tsp";
import "../service.tsp";
import "@typespec/openapi";
import "@typespec/versioning";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "../common/models.tsp";
import "./models.tsp";
import "../servicepatterns.tsp";
import "../common/servicepatterns.tsp";

using TypeSpec.Http;
using TypeSpec.Versioning;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import "@typespec/rest";
import "@azure-tools/typespec-autorest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "../service.tsp";
import "../common/models.tsp";
import "@typespec/openapi";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "@azure-tools/typespec-autorest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "../common/models.tsp";
import "../servicepatterns.tsp";
import "../common/servicepatterns.tsp";
import "./models.tsp";

using TypeSpec.Http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import "@azure-tools/typespec-autorest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "../common/models.tsp";
import "../service.tsp";
import "@typespec/openapi";

using TypeSpec.Rest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "../common/models.tsp";
import "./models.tsp";
import "../servicepatterns.tsp";
import "../common/servicepatterns.tsp";

using TypeSpec.Versioning;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import "@azure-tools/typespec-autorest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "../common/models.tsp";
import "../service.tsp";

using TypeSpec.Versioning;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "@azure-tools/typespec-autorest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "./models.tsp";
import "../servicepatterns.tsp";
import "../common/servicepatterns.tsp";
import "../common/models.tsp";

using TypeSpec.Versioning;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import "@typespec/http";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "./agents/operations.tsp"; // TODO: Rename file agents/operations.tsp to agents/routes.tsp
import "./conversations/operations.tsp"; // TODO: Rename conversations/operations.tsp to conversations/routes.tsp
import "./finetuning/operations.tsp";
Expand All @@ -21,14 +20,4 @@ import "./evaluators/routes.tsp";
import "./insights/routes.tsp";
import "./schedules/routes.tsp";

import "./service.tsp";

namespace OpenAI {
scalar integer extends TypeSpec.int64;
scalar numeric extends TypeSpec.float64;
}

namespace Azure.AI.Projects {
scalar integer extends OpenAI.integer;
scalar numeric extends OpenAI.numeric;
}
import "./common/service.tsp";
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import "@typespec/http";
import "@typespec/versioning";

import "../service.tsp";
import "../responses/models.tsp";

using TypeSpec.Http;
Expand Down
Loading
Loading