Skip to content

Conversation

@eoinfennessy
Copy link
Contributor

Summary

Updates post-training job endpoints to include {job_uuid} in the URL path instead of using it as a query parameter, while improving consistency with other Llama Stack APIs, and general adherence to RESTful conventions.

Changes

  • POST /post-training/job/cancelPOST /post-training/jobs/{job_uuid}/cancel
  • GET /post-training/job/statusGET /post-training/jobs/{job_uuid}/status
  • GET /post-training/job/artifactsGET /post-training/jobs/{job_uuid}/artifacts

Motivation

  • Makes API consistent with other Llama Stack APIs, e.g.
    • Batches API: /batches/{batch_id}/cancel
    • Eval API: /eval/benchmarks/{benchmark_id}/jobs/{job_id}
    • Files API: /files/{file_id}
    • Conversations API: /conversations/{conversation_id}
  • Aligns with OpenAI API, which uses POST /fine_tuning/jobs/{fine_tuning_job_id}/cancel for their fine-tuning API
  • Follows REST best practices:
    • Resource IDs in URL path (not query parameters)
    • Plural resource names (/jobs/ instead of /job/)
  • Adheres to Google API Improvement Proposals (AIPs):
    • AIP-136: Custom methods (cancel pattern)
    • AIP-122: Resource names (plural nouns)
  • Fixes issue introduced in feat: migrate post_training API to FastAPI router #4496, where URL paths were not updated in the FastAPI routes.

Breaking Change

This is a breaking change for the v1alpha API. Users will need to:

  • Regenerate client SDKs
  • Update direct HTTP API calls to use new endpoint paths

Testing

  • Manually verified by running server and Swagger UI

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 15, 2026
@eoinfennessy eoinfennessy changed the title feat: improve consistency of post-training API endpoints feat!: improve consistency of post-training API endpoints Jan 19, 2026
Copy link
Collaborator

@leseb leseb left a comment

Choose a reason for hiding this comment

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

wondering if we should adhere to OpenAI fine_tuning API in the future too.

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

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants