| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <pstm-uri>/models</pstm-uri>
- <pstm-template>main</pstm-template>
- </head>
- <body>
- <section>
- <h2>Model</h2>
- <p class="text-muted">The deployment's model configuration: the OpenAI-compatible endpoint
- every saddle assignment is sent to, and the advisor's optional overrides. Stored
- in the database — environment variables no longer configure it (a pre-page
- deployment's SADDLE_LLM_* environment is imported once, on first read).</p>
- <p stm-if="model == null">Loading…</p>
- <div stm-if="model != null">
- <p stm-if="!model.dispatch_ready"><span class="badge badge-offline">paused</span>
- <span class="text-muted">No base URL is configured — task assignment is paused and
- the advisor is disabled until one is saved.</span></p>
- <p stm-if="model.dispatch_ready"><span class="badge badge-done">ready</span>
- <span class="text-muted">Updated <span stm-text="model.updated_display">when</span>.</span></p>
- <form stm-action="model.save">
- <h3>Main endpoint</h3>
- <p class="text-muted">Used by every saddle assignment (the harness's LLM).</p>
- <div class="field"><label>Base URL</label>
- <input type="text" name="base_url" placeholder="http://127.0.0.1:9999/v1"
- stm-attribute.value="model.base_url"></div>
- <div class="field"><label>Model</label>
- <input type="text" name="model" placeholder="(the provider's default)"
- stm-attribute.value="model.model"></div>
- <div class="field"><label>API key</label>
- <input type="password" name="api_key" autocomplete="off"
- placeholder="Leave empty to keep the stored key">
- <span class="text-muted" stm-if="model.api_key_set">A key is stored
- (<span stm-text="model.api_key_hint">hint</span>)</span>
- <label class="choice"><input type="checkbox" name="clear_api_key" value="1"> Clear the stored key</label></div>
- <h3>Advisor endpoint (optional)</h3>
- <p class="text-muted">Overrides for the AI Chat advisor. Leave the base URL empty to
- use the main endpoint's fields.</p>
- <div class="field"><label>Base URL</label>
- <input type="text" name="advisor_base_url" placeholder="(use the main endpoint)"
- stm-attribute.value="model.advisor_base_url"></div>
- <div class="field"><label>Model</label>
- <input type="text" name="advisor_model" placeholder="(use the main endpoint's model)"
- stm-attribute.value="model.advisor_model"></div>
- <div class="field"><label>API key</label>
- <input type="password" name="advisor_api_key" autocomplete="off"
- placeholder="Leave empty to keep the stored key">
- <span class="text-muted" stm-if="model.advisor_api_key_set">A key is stored
- (<span stm-text="model.advisor_api_key_hint">hint</span>)</span>
- <label class="choice"><input type="checkbox" name="clear_advisor_api_key" value="1"> Clear the stored key</label></div>
- <button type="submit">Save configuration</button>
- </form>
- </div>
- </section>
- </body>
- </html>
|