(ctx context.Context)
| 910 | } |
| 911 | |
| 912 | func (p *Server) delegatedAPIKeyIDForSubagent(ctx context.Context) (string, error) { |
| 913 | apiKeyID, ok := aibridge.DelegatedAPIKeyIDFromContext(ctx) |
| 914 | if !ok && p.shouldUseAIGatewayRouting() { |
| 915 | return "", xerrors.New("AI Gateway routing requires the active turn API key ID for subagent messages") |
| 916 | } |
| 917 | return apiKeyID, nil |
| 918 | } |
| 919 | |
| 920 | func (p *Server) createChildSubagentChat( |
| 921 | ctx context.Context, |
no test coverage detected