model_settings.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <pstm-uri>/models</pstm-uri>
  5. <pstm-template>main</pstm-template>
  6. </head>
  7. <body>
  8. <section>
  9. <h2>Model</h2>
  10. <p class="text-muted">The deployment's model configuration: the OpenAI-compatible endpoint
  11. every saddle assignment is sent to, and the advisor's optional overrides. Stored
  12. in the database — environment variables no longer configure it (a pre-page
  13. deployment's SADDLE_LLM_* environment is imported once, on first read).</p>
  14. <p stm-if="model == null">Loading…</p>
  15. <div stm-if="model != null">
  16. <p stm-if="!model.dispatch_ready"><span class="badge badge-offline">paused</span>
  17. <span class="text-muted">No base URL is configured — task assignment is paused and
  18. the advisor is disabled until one is saved.</span></p>
  19. <p stm-if="model.dispatch_ready"><span class="badge badge-done">ready</span>
  20. <span class="text-muted">Updated <span stm-text="model.updated_display">when</span>.</span></p>
  21. <form stm-action="model.save">
  22. <h3>Main endpoint</h3>
  23. <p class="text-muted">Used by every saddle assignment (the harness's LLM).</p>
  24. <div class="field"><label>Base URL</label>
  25. <input type="text" name="base_url" placeholder="http://127.0.0.1:9999/v1"
  26. stm-attribute.value="model.base_url"></div>
  27. <div class="field"><label>Model</label>
  28. <input type="text" name="model" placeholder="(the provider's default)"
  29. stm-attribute.value="model.model"></div>
  30. <div class="field"><label>API key</label>
  31. <input type="password" name="api_key" autocomplete="off"
  32. placeholder="Leave empty to keep the stored key">
  33. <span class="text-muted" stm-if="model.api_key_set">A key is stored
  34. (<span stm-text="model.api_key_hint">hint</span>)</span>
  35. <label class="choice"><input type="checkbox" name="clear_api_key" value="1"> Clear the stored key</label></div>
  36. <h3>Advisor endpoint (optional)</h3>
  37. <p class="text-muted">Overrides for the AI Chat advisor. Leave the base URL empty to
  38. use the main endpoint's fields.</p>
  39. <div class="field"><label>Base URL</label>
  40. <input type="text" name="advisor_base_url" placeholder="(use the main endpoint)"
  41. stm-attribute.value="model.advisor_base_url"></div>
  42. <div class="field"><label>Model</label>
  43. <input type="text" name="advisor_model" placeholder="(use the main endpoint's model)"
  44. stm-attribute.value="model.advisor_model"></div>
  45. <div class="field"><label>API key</label>
  46. <input type="password" name="advisor_api_key" autocomplete="off"
  47. placeholder="Leave empty to keep the stored key">
  48. <span class="text-muted" stm-if="model.advisor_api_key_set">A key is stored
  49. (<span stm-text="model.advisor_api_key_hint">hint</span>)</span>
  50. <label class="choice"><input type="checkbox" name="clear_advisor_api_key" value="1"> Clear the stored key</label></div>
  51. <button type="submit">Save configuration</button>
  52. </form>
  53. </div>
  54. </section>
  55. </body>
  56. </html>