MCPcopy Create free account
hub / github.com/github/gh-aw / extractPiModelID

Function extractPiModelID

pkg/workflow/pi_engine.go:96–101  ·  view source on GitHub ↗

extractPiModelID returns the model ID portion of a provider/model string. For "copilot/claude-sonnet-4" it returns "claude-sonnet-4". For a bare model name (no slash) the whole string is returned unchanged.

(model string)

Source from the content-addressed store, hash-verified

94// For "copilot/claude-sonnet-4" it returns "claude-sonnet-4".
95// For a bare model name (no slash) the whole string is returned unchanged.
96func extractPiModelID(model string) string {
97 if _, after, found := strings.Cut(model, "/"); found {
98 return after
99 }
100 return model
101}
102
103// piNativeProviderName maps an AWF UniversalLLMBackend to the corresponding
104// Pi CLI built-in provider name. Used when there is no AWF gateway to proxy

Callers 2

GetExecutionStepsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected