Add read-only Debug API support and update documentation
- Introduced a local read-only Debug API accessible at `http://127.0.0.1:17821` for diagnostics and agent interactions. - Updated CLI commands to include `gpu-rent debug` for launching the Debug API. - Enhanced documentation to reflect the new Debug API features and usage. - Modified configuration to include `DEBUG_LOCAL_PORT` for easier customization. - Added tests to ensure Debug API links are correctly generated in access card outputs.
This commit is contained in:
@@ -6,6 +6,7 @@ class _Cfg:
|
||||
llm_runtime = "ollama"
|
||||
ollama_local_port = 17811
|
||||
enable_swarmui = True
|
||||
debug_local_port = 17821
|
||||
|
||||
|
||||
def test_collect_links_swarm_and_ollama(monkeypatch):
|
||||
@@ -15,16 +16,20 @@ def test_collect_links_swarm_and_ollama(monkeypatch):
|
||||
)
|
||||
links = collect_access_links(_Cfg(), tunneled=True)
|
||||
labels = [x.label for x in links]
|
||||
assert "Debug API" in labels
|
||||
assert "SwarmUI UI" in labels
|
||||
assert "Assistent" in labels
|
||||
assert "SwarmUI MCP" in labels
|
||||
assert "Ollama API" in labels
|
||||
assert any(x.label == "Assistent" and "вкладка" in x.note for x in links)
|
||||
dbg = next(x for x in links if x.label == "Debug API")
|
||||
assert dbg.url == "http://127.0.0.1:17821/"
|
||||
|
||||
|
||||
def test_collect_links_no_tunnel():
|
||||
links = collect_access_links(_Cfg(), tunneled=False)
|
||||
assert links[0].url.startswith("gpu-rent tunnel")
|
||||
assert links[0].label == "Debug API"
|
||||
assert any(x.url.startswith("gpu-rent tunnel") for x in links)
|
||||
|
||||
|
||||
def test_mcp_snippet_json():
|
||||
|
||||
Reference in New Issue
Block a user