mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
80a172f932
- Moves `coderd/chatd/`, `coderd/gitsync/`, `enterprise/coderd/chatd/` under `x/` parent directories to signal instability - Adds `Experimental:` glue code comments in `coderd/coderd.go` > 🤖 This PR was created with the help of Coder Agents, and was reviewed by my human. 🧑💻
20 lines
525 B
Go
20 lines
525 B
Go
package chatprovider
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
|
|
"github.com/coder/coder/v2/buildinfo"
|
|
)
|
|
|
|
// UserAgent returns the User-Agent string sent on all outgoing LLM
|
|
// API requests made by Coder's built-in chat (chatd). The format
|
|
// mirrors conventions used by other coding agents so that LLM
|
|
// providers can identify traffic originating from Coder.
|
|
//
|
|
// Example: coder-agents/v2.21.0 (linux/amd64)
|
|
func UserAgent() string {
|
|
return fmt.Sprintf("coder-agents/%s (%s/%s)",
|
|
buildinfo.Version(), runtime.GOOS, runtime.GOARCH)
|
|
}
|