fix agent profile selection from GUI
Two bugs: 1. GUI sends 'agent=<profile>' but server only recognized 'profile=' - Added 'agent' as alias for 'profile' in parseAgentNewRequest 2. Model dropdown showed cost columns appended to model names - /models format: backend<tab>model[<tab>in<tab>out...] - Parser took everything after first tab as model name - Now stops at second tab to extract just the model name
This commit is contained in:
parent
65e26f4a69
commit
cd76864f19
|
|
@ -168,7 +168,7 @@ func parseAgentNewRequest(data []byte) agentNewRequest {
|
|||
r.Params.Name = v
|
||||
case "remote":
|
||||
r.Params.Remote = v
|
||||
case "profile":
|
||||
case "profile", "agent":
|
||||
r.Params.Profile = v
|
||||
case "prompt":
|
||||
r.Prompt = v
|
||||
|
|
|
|||
|
|
@ -777,7 +777,10 @@ void Ollie9pClient::ensureRootDataLoaded()
|
|||
int tab = line.indexOf('\t');
|
||||
if (tab < 0) continue;
|
||||
QString be = line.left(tab).trimmed();
|
||||
QString mo = line.mid(tab + 1).trimmed();
|
||||
// Extract just the model name (second field), not the cost columns
|
||||
QString rest = line.mid(tab + 1);
|
||||
int nextTab = rest.indexOf('\t');
|
||||
QString mo = (nextTab >= 0 ? rest.left(nextTab) : rest).trimmed();
|
||||
if (!be.isEmpty() && !mo.isEmpty()) {
|
||||
QStringList list = m_rootModels[be].toStringList();
|
||||
list.append(mo);
|
||||
|
|
|
|||
Loading…
Reference in New Issue