Commit 5e58f75
fix(server): echo persisted recipe_options in the /load response
A save_options:true load *replaces* the model's stored recipe options with
the set sent in the request (omitting a key clears it). That contract is
documented but invisible to a client driving the API programmatically: the
/load response reports a bare success, so a caller incrementally tuning a
recipe cannot tell that an option it did not resend was dropped without a
follow-up /models query or reading the API docs.
Echo the model's persisted recipe_options in the /load success response
(both the per-model and collection branches), mirroring the existing
/models representation (model_info_to_json already serializes
recipe_options.to_json()). The replace-on-save semantics are unchanged; the
resulting persisted state is simply made observable. The echoed set is the
persisted one (== /models), not the per-request effective options; this is
documented in docs/api/lemonade.md.
Adds test_012m_load_response_echoes_recipe_options: asserts the response
carries recipe_options and that a subsequent partial save surfaces the
cleared key's absence. Validated on ai3 (RX 7900 XT, llamacpp/vulkan):
recipe-options suite 6/6 pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@zhipuai.cn>
Co-Authored-By: gpt-5.5 <noreply@openai.com>1 parent 31cdc92 commit 5e58f75
3 files changed
Lines changed: 107 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
558 | | - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
559 | 562 | | |
560 | 563 | | |
561 | 564 | | |
| 565 | + | |
| 566 | + | |
562 | 567 | | |
563 | 568 | | |
564 | 569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3520 | 3520 | | |
3521 | 3521 | | |
3522 | 3522 | | |
3523 | | - | |
| 3523 | + | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
3524 | 3529 | | |
3525 | 3530 | | |
3526 | 3531 | | |
| |||
3539 | 3544 | | |
3540 | 3545 | | |
3541 | 3546 | | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
3542 | 3551 | | |
3543 | 3552 | | |
3544 | 3553 | | |
3545 | | - | |
| 3554 | + | |
| 3555 | + | |
3546 | 3556 | | |
3547 | 3557 | | |
3548 | 3558 | | |
| |||
3553 | 3563 | | |
3554 | 3564 | | |
3555 | 3565 | | |
3556 | | - | |
| 3566 | + | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
3557 | 3572 | | |
3558 | 3573 | | |
3559 | 3574 | | |
3560 | 3575 | | |
3561 | | - | |
| 3576 | + | |
| 3577 | + | |
3562 | 3578 | | |
3563 | 3579 | | |
3564 | 3580 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
632 | 712 | | |
633 | 713 | | |
634 | 714 | | |
| |||
0 commit comments