Extract model name from session model string

- Use split and pop to isolate the model name after the colon
- Fall back to the full model string if no colon is present
- Maintain provider and group identifiers for model object consistency
This commit is contained in:
suyao 2025-09-20 16:28:16 +08:00
parent 282aa6e81a
commit 1c045231c8
No known key found for this signature in database

View File

@ -111,7 +111,7 @@ const AgentSessionInputbar: FC<Props> = ({ agentId, sessionId }) => {
const model: Model | undefined = session?.model
? {
id: session.model,
name: session.model,
name: session.model.split(':').pop() || session.model, // Extract model name after ':'
provider: 'agent-session',
group: 'agent-session'
}