Skip to content

accept_model_share_request

Accept a pending model share request. Caller must have Owner or Editor access to the target project in the current tenant. Writes the source model to the target repo with a provenance header. If the target path already exists, expected_sha (the current Gitea blob SHA) is required to confirm an explicit overwrite; omitting it returns a conflict error with the current SHA and a recovery hint.

NameTypeRequiredDefaultDescription
request_idAnnotated[str, Field(description='UUID of the model share request.')]Yes
target_project_nameAnnotated[str, Field(description='Name of the local project to import the shared model into.')]Yes
target_model_nameAnnotated[str, Field(description='Name to use for the imported model file in the target project.')]No''
expected_shaAnnotated[str, Field(description='Current Gitea blob SHA of the target file. Required when the target path already exists — omitting it returns a conflict error with the current SHA and a recovery hint. Ignored for first-time writes to a new path.')]No''

Returns a structured object. Top-level fields:

  • request_id (string)
  • status (string)
  • target_project (string)
  • target_model (string)
  • target_path (string)
  • source_commit_sha (string)
  • target_commit_sha (string)
  • accepted_at (string)

See the response example below for the full payload shape.

{
"name": "accept_model_share_request",
"arguments": {
"request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"target_project_name": "forecasts",
"target_model_name": "acme_revenue_forecast"
}
}
{
"request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"status": "accepted",
"target_project": "forecasts",
"target_model": "acme_revenue_forecast",
"target_path": "model/acme_revenue_forecast.py",
"source_commit_sha": "abc1234def5678901234567890abcdef12345678",
"target_commit_sha": "0123456789abcdef0123456789abcdef01234567",
"accepted_at": "2026-04-28T10:00:00+00:00"
}
  • Module: Sharing
  • Requires authentication via API token or Auth0 JWT.