mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-08-08 20:35:29 +00:00
POST /api/model-endpoints always inserted a new row, so Settings -> Add Models -> Scan for Servers re-added any endpoint a user had already registered manually — once under its model name (from the earlier manual add) and again under its host:port (auto-generated when scan posts without a name). The success toast then misreported the result as "added N new". Look up an existing endpoint with the same base_url accessible to the caller (shared or owned by them) before inserting. If found, return it with `existing: true` so the client can tell the difference between an actual add and a dedupe hit. Toast now reads, e.g., "Found 1 server with 1 model — 1 already added". Tested: POSTing the same base_url three times (incl. trailing-slash variation) returns the same id each time; only one row exists. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| admin_wipe_routes.py | ||
| api_token_routes.py | ||
| assistant_routes.py | ||
| auth_routes.py | ||
| backup_routes.py | ||
| calendar_routes.py | ||
| chat_helpers.py | ||
| chat_routes.py | ||
| cleanup_routes.py | ||
| compare_routes.py | ||
| contacts_routes.py | ||
| cookbook_helpers.py | ||
| cookbook_routes.py | ||
| diagnostics_routes.py | ||
| document_helpers.py | ||
| document_routes.py | ||
| editor_draft_routes.py | ||
| email_helpers.py | ||
| email_pollers.py | ||
| email_routes.py | ||
| embedding_routes.py | ||
| emoji_routes.py | ||
| font_routes.py | ||
| gallery_helpers.py | ||
| gallery_routes.py | ||
| history_routes.py | ||
| hwfit_routes.py | ||
| mcp_routes.py | ||
| memory_routes.py | ||
| model_routes.py | ||
| note_routes.py | ||
| personal_routes.py | ||
| prefs_routes.py | ||
| preset_routes.py | ||
| research_routes.py | ||
| search_routes.py | ||
| session_routes.py | ||
| shell_routes.py | ||
| signature_routes.py | ||
| skills_routes.py | ||
| stt_routes.py | ||
| task_routes.py | ||
| tts_routes.py | ||
| upload_routes.py | ||
| vault_routes.py | ||
| webhook_routes.py | ||