Skip to content

Commit 27a4540

Browse files
authored
Merge pull request #570 from njhale/enhance/sdkserver-credential-override
enhance: plumb credential context into run/eval requests
2 parents bcd9f33 + 1c1888d commit 27a4540

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

pkg/sdkserver/routes.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ func (s *server) execHandler(w http.ResponseWriter, r *http.Request) {
200200
CredentialContext: reqObject.CredentialContext,
201201
Runner: runner.Options{
202202
// Set the monitor factory so that we can get events from the server.
203-
MonitorFactory: NewSessionFactory(s.events),
203+
MonitorFactory: NewSessionFactory(s.events),
204+
CredentialOverride: reqObject.CredentialOverride,
204205
},
205206
}
206207

pkg/sdkserver/types.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,15 @@ type toolOrFileRequest struct {
5252
cacheOptions `json:",inline"`
5353
openAIOptions `json:",inline"`
5454

55-
ToolDefs toolDefs `json:"toolDefs,inline"`
56-
SubTool string `json:"subTool"`
57-
Input string `json:"input"`
58-
ChatState string `json:"chatState"`
59-
Workspace string `json:"workspace"`
60-
Env []string `json:"env"`
61-
CredentialContext string `json:"credentialContext"`
62-
Confirm bool `json:"confirm"`
55+
ToolDefs toolDefs `json:"toolDefs,inline"`
56+
SubTool string `json:"subTool"`
57+
Input string `json:"input"`
58+
ChatState string `json:"chatState"`
59+
Workspace string `json:"workspace"`
60+
Env []string `json:"env"`
61+
CredentialContext string `json:"credentialContext"`
62+
CredentialOverride string `json:"credentialOverride"`
63+
Confirm bool `json:"confirm"`
6364
}
6465

6566
type content struct {

0 commit comments

Comments
 (0)