Skip to content

Commit df92c75

Browse files
feat(api): manual updates
1 parent 9bd9579 commit df92c75

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-e6a9dca1a93568e403ac72128d86f30c8c3f1336d4b67017d7e61b1836f10f47.yml
33
openapi_spec_hash: ef01e0649bb0e283df0aa81c369649df
4-
config_hash: 0f2a6f228fb92683466c107fce3bcd21
4+
config_hash: 88e87ba7021be93d267ecfc8f5e6b891

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ To handle errors, we recommend that you use the `errors.As` pattern:
308308

309309
```go
310310
_, err := client.Sessions.Start(context.TODO(), stagehand.SessionStartParams{
311-
ModelName: "gpt-4o",
311+
ModelName: "openai/gpt-5-nano",
312312
})
313313
if err != nil {
314314
var apierr *stagehand.Error
@@ -337,7 +337,7 @@ defer cancel()
337337
client.Sessions.Start(
338338
ctx,
339339
stagehand.SessionStartParams{
340-
ModelName: "gpt-4o",
340+
ModelName: "openai/gpt-5-nano",
341341
},
342342
// This sets the per-retry timeout
343343
option.WithRequestTimeout(20*time.Second),
@@ -375,7 +375,7 @@ client := stagehand.NewClient(
375375
client.Sessions.Start(
376376
context.TODO(),
377377
stagehand.SessionStartParams{
378-
ModelName: "gpt-4o",
378+
ModelName: "openai/gpt-5-nano",
379379
},
380380
option.WithMaxRetries(5),
381381
)
@@ -392,7 +392,7 @@ var response *http.Response
392392
response, err := client.Sessions.Start(
393393
context.TODO(),
394394
stagehand.SessionStartParams{
395-
ModelName: "gpt-4o",
395+
ModelName: "openai/gpt-5-nano",
396396
},
397397
option.WithResponseInto(&response),
398398
)

client_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func TestUserAgentHeader(t *testing.T) {
4141
}),
4242
)
4343
client.Sessions.Start(context.Background(), stagehand.SessionStartParams{
44-
ModelName: "gpt-4o",
44+
ModelName: "openai/gpt-5-nano",
4545
})
4646
if userAgent != fmt.Sprintf("Stagehand/Go %s", internal.PackageVersion) {
4747
t.Errorf("Expected User-Agent to be correct, but got: %#v", userAgent)
@@ -69,7 +69,7 @@ func TestRetryAfter(t *testing.T) {
6969
}),
7070
)
7171
_, err := client.Sessions.Start(context.Background(), stagehand.SessionStartParams{
72-
ModelName: "gpt-4o",
72+
ModelName: "openai/gpt-5-nano",
7373
})
7474
if err == nil {
7575
t.Error("Expected there to be a cancel error")
@@ -108,7 +108,7 @@ func TestDeleteRetryCountHeader(t *testing.T) {
108108
option.WithHeaderDel("X-Stainless-Retry-Count"),
109109
)
110110
_, err := client.Sessions.Start(context.Background(), stagehand.SessionStartParams{
111-
ModelName: "gpt-4o",
111+
ModelName: "openai/gpt-5-nano",
112112
})
113113
if err == nil {
114114
t.Error("Expected there to be a cancel error")
@@ -142,7 +142,7 @@ func TestOverwriteRetryCountHeader(t *testing.T) {
142142
option.WithHeader("X-Stainless-Retry-Count", "42"),
143143
)
144144
_, err := client.Sessions.Start(context.Background(), stagehand.SessionStartParams{
145-
ModelName: "gpt-4o",
145+
ModelName: "openai/gpt-5-nano",
146146
})
147147
if err == nil {
148148
t.Error("Expected there to be a cancel error")
@@ -175,7 +175,7 @@ func TestRetryAfterMs(t *testing.T) {
175175
}),
176176
)
177177
_, err := client.Sessions.Start(context.Background(), stagehand.SessionStartParams{
178-
ModelName: "gpt-4o",
178+
ModelName: "openai/gpt-5-nano",
179179
})
180180
if err == nil {
181181
t.Error("Expected there to be a cancel error")
@@ -202,7 +202,7 @@ func TestContextCancel(t *testing.T) {
202202
cancelCtx, cancel := context.WithCancel(context.Background())
203203
cancel()
204204
_, err := client.Sessions.Start(cancelCtx, stagehand.SessionStartParams{
205-
ModelName: "gpt-4o",
205+
ModelName: "openai/gpt-5-nano",
206206
})
207207
if err == nil {
208208
t.Error("Expected there to be a cancel error")
@@ -226,7 +226,7 @@ func TestContextCancelDelay(t *testing.T) {
226226
cancelCtx, cancel := context.WithTimeout(context.Background(), 2*time.Millisecond)
227227
defer cancel()
228228
_, err := client.Sessions.Start(cancelCtx, stagehand.SessionStartParams{
229-
ModelName: "gpt-4o",
229+
ModelName: "openai/gpt-5-nano",
230230
})
231231
if err == nil {
232232
t.Error("expected there to be a cancel error")
@@ -256,7 +256,7 @@ func TestContextDeadline(t *testing.T) {
256256
}),
257257
)
258258
_, err := client.Sessions.Start(deadlineCtx, stagehand.SessionStartParams{
259-
ModelName: "gpt-4o",
259+
ModelName: "openai/gpt-5-nano",
260260
})
261261
if err == nil {
262262
t.Error("expected there to be a deadline error")

0 commit comments

Comments
 (0)