examples: replace sunset fine-tuning example with model management - #255
Draft
Nelson-PROIA wants to merge 1 commit into
Draft
examples: replace sunset fine-tuning example with model management#255Nelson-PROIA wants to merge 1 commit into
Nelson-PROIA wants to merge 1 commit into
Conversation
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
force-pushed
the
fix/example-async-jobs-model-mgmt
branch
from
July 13, 2026 17:27
7a3dd39 to
2faf376
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
examples/src/async_jobs.tscalledclient.fineTuning.jobs.*, which is no longer part of the SDK (those routes return410 Gone). The example had also been excluded fromscripts/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 totype === "fine-tuned"andclient.models.retrieve(...)run read-only and unconditionally (safe in CI);update/archive/unarchiverun only whenMISTRAL_FINE_TUNED_MODEL_IDis set, so the example never mutates account state by default.It also removes
async_jobs.tsfrom therun_examples.shexclude list so it is exercised again. For large asynchronous inference jobs,async_batch_jobs.tsremains the batch-jobs example.Typechecked against
client.models.*under the examples' strict tsconfig. Draft — do not merge.