Skip to content

feat(ai-foundry): add TypeSpec for Foundry Routines#42779

Open
lindazqli wants to merge 1 commit intoAzure:feature/foundry-releasefrom
lindazqli:foundry-routines-typespec
Open

feat(ai-foundry): add TypeSpec for Foundry Routines#42779
lindazqli wants to merge 1 commit intoAzure:feature/foundry-releasefrom
lindazqli:foundry-routines-typespec

Conversation

@lindazqli
Copy link
Copy Markdown
Contributor

Summary

Adds TypeSpec models and routes for the Foundry Routines feature, based on the C# service contracts in Vienna.

New files

  • src/routines/models.tsp — all Routines domain models
  • src/routines/routes.tsp — 7 REST operations

Modified files

  • src/common/models.tsp — adds routines_v1_preview: "Routines=V1Preview" to FoundryFeaturesOptInKeys
  • main.tsp — imports src/routines/routes.tsp
  • openapi3/ — regenerated OpenAPI output

Routes

Method Path Description
PUT /routines/{routineName} Create or update a routine
GET /routines/{routineName} Get a routine
GET /routines List all routines
DELETE /routines/{routineName} Delete a routine
POST /routines/{routineName}:dispatch Synchronous dispatch
POST /routines/{routineName}:dispatchAsync Asynchronous dispatch
GET /routines/{routineName}/runs List routine run history

Key model design

  • RoutineTrigger discriminated on type: "schedule", "timer", "github_issue"
  • RoutineAction discriminated on type: "invoke_agent_responses_api", "invoke_agent_invocations_api"
  • Routine.triggers is Record<RoutineTrigger> (named dict, matching C# Dictionary<string, RoutineTrigger>)
  • RoutineDispatchPayload discriminated on type matching RoutineActionType
  • All routes require Foundry-Features: Routines=V1Preview header

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Next Steps to Merge

Important checks have failed. As of today they are not blocking this PR, but in near future they may.
Addressing the following failures is highly recommended:
  • ⚠️ The check named Swagger BreakingChange has failed. To unblock this PR, follow the process at aka.ms/brch.
If you still want to proceed merging this PR without addressing the above failures, refer to step 4 in the PR workflow diagram.

Comment generated by summarize-checks workflow run.

@lindazqli
Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

@lindazqli lindazqli marked this pull request as ready for review April 30, 2026 04:42
- Add src/routines/models.tsp with RoutineTrigger (schedule/timer/github_issue),
  RoutineAction (invoke_agent_responses_api / invoke_agent_invocations_api),
  RoutineDispatchPayload, RoutineRunDto, and RoutineRunsResponse models
- Add src/routines/routes.tsp with createOrUpdate, get, list, delete,
  dispatch, dispatchAsync, and listRuns operations
- Add routines_v1_preview feature flag to FoundryFeaturesOptInKeys
- Wire up main.tsp import
- Regenerate openapi3 output
@lindazqli lindazqli force-pushed the foundry-routines-typespec branch from 8275815 to 8570a43 Compare April 30, 2026 04:54
@github-actions github-actions Bot added data-plane TypeSpec Authored with TypeSpec labels Apr 30, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Language API Review for Package
TypeSpec Azure.AI.Projects
Python azure-ai-projects
JavaScript @azure/ai-projects

Comment generated by After APIView workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data-plane TypeSpec Authored with TypeSpec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant