Skip to content

Commit 4b55308

Browse files
feat(api): admin spend_alerts
1 parent 0b38417 commit 4b55308

13 files changed

Lines changed: 222 additions & 59 deletions

‎.stats.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 249
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-e00ba6273043ec67eab4c213e30df144731fc5ae51d7c820ea647990c552b60b.yml
3-
openapi_spec_hash: 9168743f8e60b63630e679583b29a840
4-
config_hash: e02ca1082421dfe55b145c45e95d6126
1+
configured_endpoints: 251
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-c16aadb4992b72ce2391b8db90427e6be355e6c5f3f372bad3bfad7de5b8c8ed.yml
3+
openapi_spec_hash: 310aad77be43c413a991e659beedc1a8
4+
config_hash: c60fedbe1462084139674a3c34bbbc95

‎adminorganizationprojectspendalert.go‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,23 @@ func (r *AdminOrganizationProjectSpendAlertService) New(ctx context.Context, pro
5252
return res, err
5353
}
5454

55+
// Retrieves a project spend alert.
56+
func (r *AdminOrganizationProjectSpendAlertService) Get(ctx context.Context, projectID string, alertID string, opts ...option.RequestOption) (res *ProjectSpendAlert, err error) {
57+
var preClientOpts = []option.RequestOption{requestconfig.WithAdminAPIKeyAuthSecurity()}
58+
opts = slices.Concat(preClientOpts, r.Options, opts)
59+
if projectID == "" {
60+
err = errors.New("missing required project_id parameter")
61+
return nil, err
62+
}
63+
if alertID == "" {
64+
err = errors.New("missing required alert_id parameter")
65+
return nil, err
66+
}
67+
path := requestconfig.FormatPath("organization/projects/%s/spend_alerts/%s", projectID, alertID)
68+
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
69+
return res, err
70+
}
71+
5572
// Updates a project spend alert.
5673
func (r *AdminOrganizationProjectSpendAlertService) Update(ctx context.Context, projectID string, alertID string, body AdminOrganizationProjectSpendAlertUpdateParams, opts ...option.RequestOption) (res *ProjectSpendAlert, err error) {
5774
var preClientOpts = []option.RequestOption{requestconfig.WithAdminAPIKeyAuthSecurity()}

‎adminorganizationprojectspendalert_test.go‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,33 @@ func TestAdminOrganizationProjectSpendAlertNewWithOptionalParams(t *testing.T) {
4848
}
4949
}
5050

51+
func TestAdminOrganizationProjectSpendAlertGet(t *testing.T) {
52+
baseURL := "http://localhost:4010"
53+
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
54+
baseURL = envURL
55+
}
56+
if !testutil.CheckTestServer(t, baseURL) {
57+
return
58+
}
59+
client := openai.NewClient(
60+
option.WithBaseURL(baseURL),
61+
option.WithAPIKey("My API Key"),
62+
option.WithAdminAPIKey("My Admin API Key"),
63+
)
64+
_, err := client.Admin.Organization.Projects.SpendAlerts.Get(
65+
context.TODO(),
66+
"project_id",
67+
"alert_id",
68+
)
69+
if err != nil {
70+
var apierr *openai.Error
71+
if errors.As(err, &apierr) {
72+
t.Log(string(apierr.DumpRequest(true)))
73+
}
74+
t.Fatalf("err should be nil: %s", err.Error())
75+
}
76+
}
77+
5178
func TestAdminOrganizationProjectSpendAlertUpdateWithOptionalParams(t *testing.T) {
5279
baseURL := "http://localhost:4010"
5380
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {

‎adminorganizationspendalert.go‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ func (r *AdminOrganizationSpendAlertService) New(ctx context.Context, body Admin
4747
return res, err
4848
}
4949

50+
// Retrieves an organization spend alert.
51+
func (r *AdminOrganizationSpendAlertService) Get(ctx context.Context, alertID string, opts ...option.RequestOption) (res *OrganizationSpendAlert, err error) {
52+
var preClientOpts = []option.RequestOption{requestconfig.WithAdminAPIKeyAuthSecurity()}
53+
opts = slices.Concat(preClientOpts, r.Options, opts)
54+
if alertID == "" {
55+
err = errors.New("missing required alert_id parameter")
56+
return nil, err
57+
}
58+
path := requestconfig.FormatPath("organization/spend_alerts/%s", alertID)
59+
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
60+
return res, err
61+
}
62+
5063
// Updates an organization spend alert.
5164
func (r *AdminOrganizationSpendAlertService) Update(ctx context.Context, alertID string, body AdminOrganizationSpendAlertUpdateParams, opts ...option.RequestOption) (res *OrganizationSpendAlert, err error) {
5265
var preClientOpts = []option.RequestOption{requestconfig.WithAdminAPIKeyAuthSecurity()}

‎adminorganizationspendalert_test.go‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,29 @@ func TestAdminOrganizationSpendAlertNewWithOptionalParams(t *testing.T) {
4444
}
4545
}
4646

47+
func TestAdminOrganizationSpendAlertGet(t *testing.T) {
48+
baseURL := "http://localhost:4010"
49+
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
50+
baseURL = envURL
51+
}
52+
if !testutil.CheckTestServer(t, baseURL) {
53+
return
54+
}
55+
client := openai.NewClient(
56+
option.WithBaseURL(baseURL),
57+
option.WithAPIKey("My API Key"),
58+
option.WithAdminAPIKey("My Admin API Key"),
59+
)
60+
_, err := client.Admin.Organization.SpendAlerts.Get(context.TODO(), "alert_id")
61+
if err != nil {
62+
var apierr *openai.Error
63+
if errors.As(err, &apierr) {
64+
t.Log(string(apierr.DumpRequest(true)))
65+
}
66+
t.Fatalf("err should be nil: %s", err.Error())
67+
}
68+
}
69+
4770
func TestAdminOrganizationSpendAlertUpdateWithOptionalParams(t *testing.T) {
4871
baseURL := "http://localhost:4010"
4972
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {

‎aliases.go‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ const OAuthErrorCodeInvalidSubjectToken = shared.OAuthErrorCodeInvalidSubjectTok
463463
// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
464464
//
465465
// This is an alias to an internal type.
466-
type ReasoningParam = shared.ReasoningParam
466+
type Reasoning = shared.Reasoning
467467

468468
// Controls which reasoning items are rendered back to the model on later turns.
469469
// When returned on a response, this is the effective reasoning context mode used
@@ -518,6 +518,14 @@ const ReasoningSummaryConcise = shared.ReasoningSummaryConcise
518518
// Equals "detailed"
519519
const ReasoningSummaryDetailed = shared.ReasoningSummaryDetailed
520520

521+
// **gpt-5 and o-series models only**
522+
//
523+
// Configuration options for
524+
// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
525+
//
526+
// This is an alias to an internal type.
527+
type ReasoningParam = shared.ReasoningParam
528+
521529
// Constrains effort on reasoning for
522530
// [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
523531
// supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.

‎api.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared">shared</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared#FunctionDefinition">FunctionDefinition</a>
2626
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared">shared</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared#FunctionParameters">FunctionParameters</a>
2727
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared">shared</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared#Metadata">Metadata</a>
28+
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared">shared</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared#Reasoning">Reasoning</a>
2829
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared">shared</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared#ReasoningEffort">ReasoningEffort</a>
2930
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared">shared</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared#ResponseFormatJSONObject">ResponseFormatJSONObject</a>
3031
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared">shared</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/shared#ResponseFormatJSONSchema">ResponseFormatJSONSchema</a>
@@ -842,6 +843,7 @@ Response Types:
842843
Methods:
843844

844845
- <code title="post /organization/spend_alerts">client.Admin.Organization.SpendAlerts.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationSpendAlertService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationSpendAlertNewParams">AdminOrganizationSpendAlertNewParams</a>) (\*<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#OrganizationSpendAlert">OrganizationSpendAlert</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
846+
- <code title="get /organization/spend_alerts/{alert_id}">client.Admin.Organization.SpendAlerts.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationSpendAlertService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, alertID <a href="https://pkg.go.dev/builtin#string">string</a>) (\*<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#OrganizationSpendAlert">OrganizationSpendAlert</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
845847
- <code title="post /organization/spend_alerts/{alert_id}">client.Admin.Organization.SpendAlerts.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationSpendAlertService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, alertID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationSpendAlertUpdateParams">AdminOrganizationSpendAlertUpdateParams</a>) (\*<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#OrganizationSpendAlert">OrganizationSpendAlert</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
846848
- <code title="get /organization/spend_alerts">client.Admin.Organization.SpendAlerts.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationSpendAlertService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationSpendAlertListParams">AdminOrganizationSpendAlertListParams</a>) (\*<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/packages/pagination#ConversationCursorPage">ConversationCursorPage</a>[<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#OrganizationSpendAlert">OrganizationSpendAlert</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
847849
- <code title="delete /organization/spend_alerts/{alert_id}">client.Admin.Organization.SpendAlerts.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationSpendAlertService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, alertID <a href="https://pkg.go.dev/builtin#string">string</a>) (\*<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#OrganizationSpendAlertDeleted">OrganizationSpendAlertDeleted</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
@@ -1040,6 +1042,7 @@ Response Types:
10401042
Methods:
10411043

10421044
- <code title="post /organization/projects/{project_id}/spend_alerts">client.Admin.Organization.Projects.SpendAlerts.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationProjectSpendAlertService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, projectID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationProjectSpendAlertNewParams">AdminOrganizationProjectSpendAlertNewParams</a>) (\*<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#ProjectSpendAlert">ProjectSpendAlert</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
1045+
- <code title="get /organization/projects/{project_id}/spend_alerts/{alert_id}">client.Admin.Organization.Projects.SpendAlerts.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationProjectSpendAlertService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, projectID <a href="https://pkg.go.dev/builtin#string">string</a>, alertID <a href="https://pkg.go.dev/builtin#string">string</a>) (\*<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#ProjectSpendAlert">ProjectSpendAlert</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
10431046
- <code title="post /organization/projects/{project_id}/spend_alerts/{alert_id}">client.Admin.Organization.Projects.SpendAlerts.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationProjectSpendAlertService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, projectID <a href="https://pkg.go.dev/builtin#string">string</a>, alertID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationProjectSpendAlertUpdateParams">AdminOrganizationProjectSpendAlertUpdateParams</a>) (\*<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#ProjectSpendAlert">ProjectSpendAlert</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
10441047
- <code title="get /organization/projects/{project_id}/spend_alerts">client.Admin.Organization.Projects.SpendAlerts.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationProjectSpendAlertService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, projectID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationProjectSpendAlertListParams">AdminOrganizationProjectSpendAlertListParams</a>) (\*<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/packages/pagination#ConversationCursorPage">ConversationCursorPage</a>[<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#ProjectSpendAlert">ProjectSpendAlert</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
10451048
- <code title="delete /organization/projects/{project_id}/spend_alerts/{alert_id}">client.Admin.Organization.Projects.SpendAlerts.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AdminOrganizationProjectSpendAlertService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, projectID <a href="https://pkg.go.dev/builtin#string">string</a>, alertID <a href="https://pkg.go.dev/builtin#string">string</a>) (\*<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#ProjectSpendAlertDeleted">ProjectSpendAlertDeleted</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

‎conversations/aliases.go‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ const OAuthErrorCodeInvalidSubjectToken = shared.OAuthErrorCodeInvalidSubjectTok
463463
// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
464464
//
465465
// This is an alias to an internal type.
466-
type ReasoningParam = shared.ReasoningParam
466+
type Reasoning = shared.Reasoning
467467

468468
// Controls which reasoning items are rendered back to the model on later turns.
469469
// When returned on a response, this is the effective reasoning context mode used
@@ -518,6 +518,14 @@ const ReasoningSummaryConcise = shared.ReasoningSummaryConcise
518518
// Equals "detailed"
519519
const ReasoningSummaryDetailed = shared.ReasoningSummaryDetailed
520520

521+
// **gpt-5 and o-series models only**
522+
//
523+
// Configuration options for
524+
// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
525+
//
526+
// This is an alias to an internal type.
527+
type ReasoningParam = shared.ReasoningParam
528+
521529
// Constrains effort on reasoning for
522530
// [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
523531
// supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.

‎realtime/aliases.go‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ const OAuthErrorCodeInvalidSubjectToken = shared.OAuthErrorCodeInvalidSubjectTok
463463
// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
464464
//
465465
// This is an alias to an internal type.
466-
type ReasoningParam = shared.ReasoningParam
466+
type Reasoning = shared.Reasoning
467467

468468
// Controls which reasoning items are rendered back to the model on later turns.
469469
// When returned on a response, this is the effective reasoning context mode used
@@ -518,6 +518,14 @@ const ReasoningSummaryConcise = shared.ReasoningSummaryConcise
518518
// Equals "detailed"
519519
const ReasoningSummaryDetailed = shared.ReasoningSummaryDetailed
520520

521+
// **gpt-5 and o-series models only**
522+
//
523+
// Configuration options for
524+
// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
525+
//
526+
// This is an alias to an internal type.
527+
type ReasoningParam = shared.ReasoningParam
528+
521529
// Constrains effort on reasoning for
522530
// [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
523531
// supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.

‎responses/aliases.go‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ const OAuthErrorCodeInvalidSubjectToken = shared.OAuthErrorCodeInvalidSubjectTok
463463
// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
464464
//
465465
// This is an alias to an internal type.
466-
type ReasoningParam = shared.ReasoningParam
466+
type Reasoning = shared.Reasoning
467467

468468
// Controls which reasoning items are rendered back to the model on later turns.
469469
// When returned on a response, this is the effective reasoning context mode used
@@ -518,6 +518,14 @@ const ReasoningSummaryConcise = shared.ReasoningSummaryConcise
518518
// Equals "detailed"
519519
const ReasoningSummaryDetailed = shared.ReasoningSummaryDetailed
520520

521+
// **gpt-5 and o-series models only**
522+
//
523+
// Configuration options for
524+
// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
525+
//
526+
// This is an alias to an internal type.
527+
type ReasoningParam = shared.ReasoningParam
528+
521529
// Constrains effort on reasoning for
522530
// [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
523531
// supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.

0 commit comments

Comments
 (0)