Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b867a6276e |
+5
-1
@@ -3,7 +3,11 @@
|
|||||||
All notable changes to this project are documented here.
|
All notable changes to this project are documented here.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
||||||
|
|
||||||
## [0.2.28] - 2026-07-21
|
## [0.2.29] - 2026-07-21
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- **Duplicate Local Model Registration**: Fixed `duplicate managed model id` conflict in `register_import` by cleanly routing managed CMF models directly into `[[cmf.servers]]` with automatic free port allocation without pushing duplicate entries to `[[models]]`.
|
||||||
|
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- **Quantization Badge & Title for Pre-Converted Models**: Automatically detect quantization (`Q1`, `Q1T`) for ready-to-run `.cmf` models (e.g. `infosave/Bonsai-27Bcmf`) from repo name and downloaded filename, resolving default `Q8_2F` badge fallback. Updated section title to "Загрузки / Конвертации" ("Downloads & Conversions").
|
- **Quantization Badge & Title for Pre-Converted Models**: Automatically detect quantization (`Q1`, `Q1T`) for ready-to-run `.cmf` models (e.g. `infosave/Bonsai-27Bcmf`) from repo name and downloaded filename, resolving default `Q8_2F` badge fallback. Updated section title to "Загрузки / Конвертации" ("Downloads & Conversions").
|
||||||
|
|||||||
Generated
+1
-1
@@ -285,7 +285,7 @@ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cortiq-gateway"
|
name = "cortiq-gateway"
|
||||||
version = "0.2.28"
|
version = "0.2.29"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cortiq-gateway"
|
name = "cortiq-gateway"
|
||||||
version = "0.2.28"
|
version = "0.2.29"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.75"
|
rust-version = "1.75"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|||||||
+27
-13
@@ -1304,9 +1304,34 @@ async fn register_import(State(state): State<SharedState>, Path(job): Path<Strin
|
|||||||
.unwrap_or_else(|| "cmf-local".into());
|
.unwrap_or_else(|| "cmf-local".into());
|
||||||
let id = format!("cmf-{base}");
|
let id = format!("cmf-{base}");
|
||||||
let mut cfg = current_cfg(&state);
|
let mut cfg = current_cfg(&state);
|
||||||
if cfg.models.iter().any(|m| m.id == id) {
|
|
||||||
return Err(ApiError::bad(format!("model '{id}' already registered")));
|
let is_in_models = cfg.models.iter().any(|m| m.id == id);
|
||||||
|
let is_in_servers = cfg
|
||||||
|
.cmf
|
||||||
|
.servers
|
||||||
|
.iter()
|
||||||
|
.any(|s| s.id == id || s.model == j.output);
|
||||||
|
|
||||||
|
if is_in_models || is_in_servers {
|
||||||
|
return Err(ApiError::bad(format!("model '{id}' is already registered")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg.cmf.manage_server {
|
||||||
|
let host = if cfg.cmf.local_host.trim().is_empty() {
|
||||||
|
"127.0.0.1"
|
||||||
|
} else {
|
||||||
|
&cfg.cmf.local_host
|
||||||
|
};
|
||||||
|
let base_port = cfg.cmf.servers.iter().map(|s| s.port).max().unwrap_or(8089);
|
||||||
|
let port = next_free_port(host, base_port).unwrap_or_else(|| base_port + 1);
|
||||||
|
cfg.cmf.servers.push(crate::config::CmfServer {
|
||||||
|
id: id.clone(),
|
||||||
|
model: j.output.clone(),
|
||||||
|
port,
|
||||||
|
threads: cfg.cmf.threads,
|
||||||
|
gpu: cfg.cmf.gpu,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
cfg.models.push(crate::config::ModelCfg {
|
cfg.models.push(crate::config::ModelCfg {
|
||||||
id: id.clone(),
|
id: id.clone(),
|
||||||
provider: "openai".into(),
|
provider: "openai".into(),
|
||||||
@@ -1319,17 +1344,6 @@ async fn register_import(State(state): State<SharedState>, Path(job): Path<Strin
|
|||||||
api_key_env: None,
|
api_key_env: None,
|
||||||
caps: Vec::new(),
|
caps: Vec::new(),
|
||||||
});
|
});
|
||||||
if cfg.cmf.manage_server {
|
|
||||||
let port = cfg.cmf.local_port;
|
|
||||||
if !cfg.cmf.servers.iter().any(|s| s.model == j.output) {
|
|
||||||
cfg.cmf.servers.push(crate::config::CmfServer {
|
|
||||||
id: id.clone(),
|
|
||||||
model: j.output.clone(),
|
|
||||||
port,
|
|
||||||
threads: cfg.cmf.threads,
|
|
||||||
gpu: cfg.cmf.gpu,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
state.reload(cfg)?;
|
state.reload(cfg)?;
|
||||||
ok(json!({ "ok": true, "model_id": id }))
|
ok(json!({ "ok": true, "model_id": id }))
|
||||||
|
|||||||
Reference in New Issue
Block a user