Skip to content

examples: replace sunset fine-tuning example with model management - #255

Draft
Nelson-PROIA wants to merge 1 commit into
mainfrom
fix/example-async-jobs-model-mgmt
Draft

examples: replace sunset fine-tuning example with model management#255
Nelson-PROIA wants to merge 1 commit into
mainfrom
fix/example-async-jobs-model-mgmt

Conversation

@Nelson-PROIA

@Nelson-PROIA Nelson-PROIA commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What

examples/src/async_jobs.ts called client.fineTuning.jobs.*, which is no longer part of the SDK (those routes return 410 Gone). The example had also been excluded from scripts/run_examples.sh, so it was neither compiling nor validated.

This rewrites it to manage existing fine-tuned models through client.models.*:

  • client.models.list() filtered to type === "fine-tuned" and client.models.retrieve(...) run read-only and unconditionally (safe in CI);
  • update / archive / unarchive run only when MISTRAL_FINE_TUNED_MODEL_ID is set, so the example never mutates account state by default.

It also removes async_jobs.ts from the run_examples.sh exclude list so it is exercised again. For large asynchronous inference jobs, async_batch_jobs.ts remains the batch-jobs example.

Typechecked against client.models.* under the examples' strict tsconfig. Draft — do not merge.

client.fineTuning.jobs.* is no longer part of the SDK; those routes return
410 Gone. async_jobs.ts still called that surface, so it had been excluded from
the example run.

Rewrite it to manage fine-tuned models through client.models.* (list, retrieve,
and an opt-in update/archive/unarchive flow) and re-enable it in run_examples.sh
so the example is exercised again.
@Nelson-PROIA
Nelson-PROIA force-pushed the fix/example-async-jobs-model-mgmt branch from 7a3dd39 to 2faf376 Compare July 13, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant