docs: document llm.toml and llama-swap metadata discovery
README, CLAUDE.md and .env.example now point at llm.toml for LLM settings (OPENROUTER_API_KEY stays in env) and describe the legacy env override window, the discovered picker and the startup cross-check. ADR-0003 records the move and amends ADR-0002's deployment-config home; CONTEXT.md's Deployment config / Hard default entries follow. Source comments and the "set LLAMA_SWAP_URL" error strings name the llm.toml keys. Also fixes README's AGENTIC_MAX_ITERATIONS default (10 -> 12, what the code uses). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d68d9b09f3
commit
09b9e87396
21 files changed
+209
-244
No files matched your search
+5
-5
@@ -391,7 +391,7 @@ pub async fn tts_speech_handler(
|
||||
let Some(client) = app_state.llamacpp.as_ref() else {
|
||||
span.set_status(Status::error("tts backend not configured"));
|
||||
return HttpResponse::ServiceUnavailable()
|
||||
.json(json!({ "error": "TTS backend not configured (set LLAMA_SWAP_URL)" }));
|
||||
.json(json!({ "error": "TTS backend not configured (set llamacpp.url in llm.toml)" }));
|
||||
};
|
||||
|
||||
let format = req
|
||||
@@ -521,7 +521,7 @@ pub async fn create_speech_job_handler(
|
||||
if app_state.llamacpp.is_none() {
|
||||
span.set_status(Status::error("tts backend not configured"));
|
||||
return HttpResponse::ServiceUnavailable()
|
||||
.json(json!({ "error": "TTS backend not configured (set LLAMA_SWAP_URL)" }));
|
||||
.json(json!({ "error": "TTS backend not configured (set llamacpp.url in llm.toml)" }));
|
||||
}
|
||||
|
||||
let format = req
|
||||
@@ -958,7 +958,7 @@ pub struct CreateVoiceFromLibraryRequest {
|
||||
/// lets the client pick the clean-speech section of a long recording.
|
||||
#[serde(default)]
|
||||
pub start_seconds: Option<f64>,
|
||||
/// Reference window length; clamped to LLAMA_SWAP_TTS_REF_SECONDS.
|
||||
/// Reference window length; clamped to `tts.ref_seconds`.
|
||||
#[serde(default)]
|
||||
pub duration_seconds: Option<f64>,
|
||||
}
|
||||
@@ -966,7 +966,7 @@ pub struct CreateVoiceFromLibraryRequest {
|
||||
/// POST /tts/voices/from-library — register a cloned voice from a file already
|
||||
/// in a library. Audio and video alike are ffmpeg-normalized to a mono 24 kHz
|
||||
/// WAV reference clip (window selected by start/duration_seconds, length
|
||||
/// capped by LLAMA_SWAP_TTS_REF_SECONDS).
|
||||
/// capped by `tts.ref_seconds`).
|
||||
#[post("/tts/voices/from-library")]
|
||||
#[tracing::instrument(name = "http.tts.voices.from_library", skip_all)]
|
||||
pub async fn create_voice_from_library_handler(
|
||||
@@ -1153,7 +1153,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn resolve_ref_window_defaults_to_start_of_clip_at_cap_length() {
|
||||
// Reads the live cap rather than mutating LLAMA_SWAP_TTS_REF_SECONDS:
|
||||
// Reads the live cap rather than mutating `tts.ref_seconds`:
|
||||
// env mutation flakes under the parallel suite (see env_dispatch).
|
||||
let cap = f64::from(tts_ref_seconds());
|
||||
assert_eq!(resolve_ref_window(None, None), Ok((0.0, cap)));
|
||||
|
||||
Reference in new issue
Block a user