fix(gateway): persist pairing tokens and honor docker config (#630)
* fix(gateway): honor config bind settings and persist pairing Resolve docker-compose startup and restart friction by: - using config host/port defaults for gateway/daemon unless CLI flags are passed - persisting paired token hashes to config.toml on successful /pair - running container default command as 'zeroclaw gateway' (no hardcoded --host/--port overrides) - updating compose image/docs to zeroclaw-labs namespace - adding MODEL env fallback for default_model override and targeted regression tests * chore(ci): sync lockfile and restore rustfmt parity Update Cargo.lock to match Cargo.toml and format src/service/mod.rs so rust quality gates stop failing with unrelated baseline drift.
This commit is contained in:
parent
35f7597c3c
commit
30b9df761a
6 changed files with 103 additions and 36 deletions
|
|
@ -2003,8 +2003,8 @@ impl Config {
|
|||
}
|
||||
}
|
||||
|
||||
// Model: ZEROCLAW_MODEL
|
||||
if let Ok(model) = std::env::var("ZEROCLAW_MODEL") {
|
||||
// Model: ZEROCLAW_MODEL or MODEL
|
||||
if let Ok(model) = std::env::var("ZEROCLAW_MODEL").or_else(|_| std::env::var("MODEL")) {
|
||||
if !model.is_empty() {
|
||||
self.default_model = Some(model);
|
||||
}
|
||||
|
|
@ -3292,6 +3292,22 @@ default_temperature = 0.7
|
|||
std::env::remove_var("ZEROCLAW_MODEL");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn env_override_model_fallback() {
|
||||
let _env_guard = env_override_test_guard();
|
||||
let mut config = Config::default();
|
||||
|
||||
std::env::remove_var("ZEROCLAW_MODEL");
|
||||
std::env::set_var("MODEL", "anthropic/claude-3.5-sonnet");
|
||||
config.apply_env_overrides();
|
||||
assert_eq!(
|
||||
config.default_model.as_deref(),
|
||||
Some("anthropic/claude-3.5-sonnet")
|
||||
);
|
||||
|
||||
std::env::remove_var("MODEL");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn env_override_workspace() {
|
||||
let _env_guard = env_override_test_guard();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue