Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12ab391679 |
+3
-15
@@ -7064,18 +7064,6 @@ def admin_save_config():
|
|||||||
new_key = prov.get("api_key", "")
|
new_key = prov.get("api_key", "")
|
||||||
if not new_key:
|
if not new_key:
|
||||||
prov["api_key"] = cfg["providers"][name].get("api_key", "")
|
prov["api_key"] = cfg["providers"][name].get("api_key", "")
|
||||||
# Enabling a cloud provider requires a usable key (incoming,
|
|
||||||
# stored, or env). Prevents silent auth failures where
|
|
||||||
# `enabled=True` is saved with no key and queries 401 at
|
|
||||||
# call time. get_api_key() checks config + env fallback.
|
|
||||||
if prov.get("enabled") is True:
|
|
||||||
effective_key = prov.get("api_key") or get_api_key(name)
|
|
||||||
if not effective_key:
|
|
||||||
return jsonify({
|
|
||||||
"error": f"Cannot enable provider '{name}' without an API key. "
|
|
||||||
f"Provide api_key in the request, save a key first, "
|
|
||||||
f"or set the environment variable."
|
|
||||||
}), 400
|
|
||||||
cfg["providers"][name].update(prov)
|
cfg["providers"][name].update(prov)
|
||||||
if "disabled_models" in data:
|
if "disabled_models" in data:
|
||||||
cfg["disabled_models"] = data["disabled_models"]
|
cfg["disabled_models"] = data["disabled_models"]
|
||||||
@@ -9968,7 +9956,7 @@ def _run_meta_pipeline(pipeline_id):
|
|||||||
stages = pipe["stages"] or ["extract", "research", "validate", "synthesize"]
|
stages = pipe["stages"] or ["extract", "research", "validate", "synthesize"]
|
||||||
data_source = pipe["data_source"]
|
data_source = pipe["data_source"]
|
||||||
config = pipe["config"] or {}
|
config = pipe["config"] or {}
|
||||||
model_sets = config.get("model_sets", [["qwen2.5:latest"], ["mistral:latest"], ["gemma2:latest"]])
|
model_sets = config.get("model_sets", [["qwen2.5:latest"], ["ollama_cloud::gpt-oss:120b"], ["gemma2:latest"]])
|
||||||
max_iterations = config.get("max_iterations", len(model_sets))
|
max_iterations = config.get("max_iterations", len(model_sets))
|
||||||
|
|
||||||
_meta_status[pipeline_id] = {"stage": 0, "substep": "Gathering data...", "progress": 0, "iteration": 0}
|
_meta_status[pipeline_id] = {"stage": 0, "substep": "Gathering data...", "progress": 0, "iteration": 0}
|
||||||
@@ -10093,7 +10081,7 @@ def create_meta_pipeline():
|
|||||||
all_m = [m["name"] for m in resp.json().get("models", []) if m["size"] > 1e9]
|
all_m = [m["name"] for m in resp.json().get("models", []) if m["size"] > 1e9]
|
||||||
models = [[m] for m in all_m[:4]]
|
models = [[m] for m in all_m[:4]]
|
||||||
except Exception:
|
except Exception:
|
||||||
models = [["qwen2.5:latest"], ["mistral:latest"]]
|
models = [["qwen2.5:latest"], ["ollama_cloud::gpt-oss:120b"]]
|
||||||
|
|
||||||
config = {"model_sets": models, "max_iterations": len(models)}
|
config = {"model_sets": models, "max_iterations": len(models)}
|
||||||
with get_db() as conn:
|
with get_db() as conn:
|
||||||
@@ -11844,7 +11832,7 @@ def run_refine(config):
|
|||||||
start = time.time() * 1000
|
start = time.time() * 1000
|
||||||
prompt = config["prompt"]
|
prompt = config["prompt"]
|
||||||
orchestrator = config.get("orchestrator", "qwen2.5:latest")
|
orchestrator = config.get("orchestrator", "qwen2.5:latest")
|
||||||
workers = config.get("models", ["qwen2.5:latest", "mistral:latest"])
|
workers = config.get("models", ["qwen2.5:latest", "ollama_cloud::gpt-oss:120b"])
|
||||||
max_stages = config.get("max_stages", 5)
|
max_stages = config.get("max_stages", 5)
|
||||||
yield sse({"type": "clear"})
|
yield sse({"type": "clear"})
|
||||||
steps = []
|
steps = []
|
||||||
|
|||||||
Reference in New Issue
Block a user