Embedding FT
Run Workflow
- The wrapper uses the repository-pinned published CLI. Use
TIANGONG_LCA_CLI_DIRor--cli-dironly for an exact local dev/CI override. - Configure the API base URL, Supabase publishable key, and environment-specific public OAuth client ID.
- Run
tiangong-lca auth doctor-auth --json. If it returnslogin-required, stop and ask the human user to runtiangong-lca auth loginin a trusted terminal. - Execute
node scripts/run-embedding-ft.mjswith standardtiangong-lca admin embedding-runflags. - The wrapper delegates to
tiangong-lca admin embedding-run; the CLI resolves and refreshes its private OAuth session. - Inspect
completedJobsandfailedJobs, then triage via references.
Never ask an AI user for a username, password, authorization code, access token, refresh token, or the deprecated encoded API key. Headless runs may use only an orchestrator-injected short-lived TIANGONG_LCA_ACCESS_TOKEN; do not pass it through argv, prompts, logs, or artifacts.
Commands
TIANGONG_LCA_API_BASE_URL="https://example.supabase.co/functions/v1" \
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY="<publishable-key>" \
TIANGONG_LCA_OAUTH_CLIENT_ID="<public-oauth-client-id>" \
tiangong-lca auth doctor-auth --json
TIANGONG_LCA_API_BASE_URL="https://example.supabase.co/functions/v1" \
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY="<publishable-key>" \
TIANGONG_LCA_OAUTH_CLIENT_ID="<public-oauth-client-id>" \
node scripts/run-embedding-ft.mjs --dry-run
TIANGONG_LCA_API_BASE_URL="https://example.supabase.co/functions/v1" \
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY="<publishable-key>" \
TIANGONG_LCA_OAUTH_CLIENT_ID="<public-oauth-client-id>" \
node scripts/run-embedding-ft.mjs
node scripts/run-embedding-ft.mjs \
--input ./assets/example-jobs.json \
--base-url "https://example.supabase.co/functions/v1"
# Force a local CLI working tree during dev/CI
TIANGONG_LCA_CLI_DIR=/path/to/tiangong-lca-cli \
node scripts/run-embedding-ft.mjs \
--dry-run \
--base-url "https://example.supabase.co/functions/v1"
Fast Triage
400: request body is not a valid job array.500: SageMaker request/response parsing failure.completedJobs < submitted: inspect queue payload, row version, and content function output.
Load References On Demand
references/env.md: auth and caller environment.references/job-contract.md: queue semantics and DB side effects.references/testing.md: smoke-test and debug checklist.