Files
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
The forge tree held the package scaffolding and none of the generated sources —
2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply
absent, so anything depending on this copy had a package that compiled to
nothing usable.

Generated from the current API document rather than reconciled with the other
copy: a client is a function of the spec, so regenerating answers "which history
wins" without anyone having to choose. .spec-lock records which document, so the
next reader can tell.
2026-08-23 10:04:41 -07:00

410 lines
29 KiB
Swift

//
// BenchmarkAPI.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
open class BenchmarkAPI {
/**
Is the canonical public benchmarks this arena runs — the id, title, axis, item count and upstream source of each, with native marking the ones the standardized harness runs today; the rest are registered and adapter-pending.
- parameter apiConfiguration: The configuration for the http request.
- returns: BenchmarkCatalog
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getBenchmarkCatalog(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> BenchmarkCatalog {
return try await getBenchmarkCatalogWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Is the canonical public benchmarks this arena runs — the id, title, axis, item count and upstream source of each, with native marking the ones the standardized harness runs today; the rest are registered and adapter-pending.
- GET /v1/benchmark/catalog
- Is the canonical public benchmarks this arena runs — the id, title, axis, item count and upstream source of each, with native marking the ones the standardized harness runs today; the rest are registered and adapter-pending. These ids are the vocabulary the rest of the surface takes: a run names them, and the leaderboard and compare read them from ?benchmark=. The catalog is deployment-wide and identical for every caller — there is no tenant in it.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<BenchmarkCatalog>
*/
open class func getBenchmarkCatalogWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<BenchmarkCatalog> {
let localVariablePath = "/v1/benchmark/catalog"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<BenchmarkCatalog>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Lists the effective published claims: what the leaderboard will use for each (benchmark, model) after the seed, the import and any stored correction are layered.
- parameter benchmark: (query) Benchmark filters to one benchmark id. Empty returns every benchmark. (optional)
- parameter model: (query) Model filters to one model. Empty returns every model. (optional)
- parameter provider: (query) Provider filters to one lab or leaderboard — the way to read what a single source claims across every model it covers. (optional)
- parameter source: (query) Source filters to one citation, which is the finest grain there is: a source is what makes two claims about one model independent rather than a restatement of each other. (optional)
- parameter _protocol: (query) Protocol filters by HOW a claim was scored, so provider cards can be read apart from third parties running their own harness. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: ClaimsOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getBenchmarkClaims(benchmark: String? = nil, model: String? = nil, provider: String? = nil, source: String? = nil, _protocol: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> ClaimsOut {
return try await getBenchmarkClaimsWithRequestBuilder(benchmark: benchmark, model: model, provider: provider, source: source, _protocol: _protocol, apiConfiguration: apiConfiguration).execute().body
}
/**
Lists the effective published claims: what the leaderboard will use for each (benchmark, model) after the seed, the import and any stored correction are layered.
- GET /v1/benchmark/claims
- Lists the effective published claims: what the leaderboard will use for each (benchmark, model) after the seed, the import and any stored correction are layered. It answers the operator's question — what does this arena currently believe someone else reported, and did we ship that or fix it. Effective values only. The history of a key lives in the append-only file and is not what this op is for; a list that returned every superseded row would make the common question the hard one.
- Bearer Token:
- type: http
- name: bearer
- parameter benchmark: (query) Benchmark filters to one benchmark id. Empty returns every benchmark. (optional)
- parameter model: (query) Model filters to one model. Empty returns every model. (optional)
- parameter provider: (query) Provider filters to one lab or leaderboard — the way to read what a single source claims across every model it covers. (optional)
- parameter source: (query) Source filters to one citation, which is the finest grain there is: a source is what makes two claims about one model independent rather than a restatement of each other. (optional)
- parameter _protocol: (query) Protocol filters by HOW a claim was scored, so provider cards can be read apart from third parties running their own harness. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<ClaimsOut>
*/
open class func getBenchmarkClaimsWithRequestBuilder(benchmark: String? = nil, model: String? = nil, provider: String? = nil, source: String? = nil, _protocol: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<ClaimsOut> {
let localVariablePath = "/v1/benchmark/claims"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"Benchmark": (wrappedValue: benchmark?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"Model": (wrappedValue: model?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"Provider": (wrappedValue: provider?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"Source": (wrappedValue: source?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"Protocol": (wrappedValue: _protocol?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<ClaimsOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Is the ONLY valid arm-vs-arm test: it pairs the two models on the items BOTH completed, and answers rescue and damage counts with an exact-McNemar p.
- parameter a: (query) A is the first model id. It is required.
- parameter b: (query) B is the second model id. It is required.
- parameter benchmark: (query) Benchmark is the catalog id to compare on, defaulting to gpqa_diamond. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: Pairing
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getBenchmarkCompare(a: String, b: String, benchmark: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Pairing {
return try await getBenchmarkCompareWithRequestBuilder(a: a, b: b, benchmark: benchmark, apiConfiguration: apiConfiguration).execute().body
}
/**
Is the ONLY valid arm-vs-arm test: it pairs the two models on the items BOTH completed, and answers rescue and damage counts with an exact-McNemar p.
- GET /v1/benchmark/compare
- Is the ONLY valid arm-vs-arm test: it pairs the two models on the items BOTH completed, and answers rescue and damage counts with an exact-McNemar p. Pairing is what prevents the subset artifact — comparing one model's easy subset against another's full run — so n_common, not either arm's own coverage, is the number to read this by. Both a and b are required. The benchmark defaults to gpqa_diamond.
- Bearer Token:
- type: http
- name: bearer
- parameter a: (query) A is the first model id. It is required.
- parameter b: (query) B is the second model id. It is required.
- parameter benchmark: (query) Benchmark is the catalog id to compare on, defaulting to gpqa_diamond. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Pairing>
*/
open class func getBenchmarkCompareWithRequestBuilder(a: String, b: String, benchmark: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Pairing> {
let localVariablePath = "/v1/benchmark/compare"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"benchmark": (wrappedValue: benchmark?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"a": (wrappedValue: a.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"b": (wrappedValue: b.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<Pairing>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns each model's measured score per run over time, oldest first, with the change between runs.
- parameter benchmark: (query) Benchmark is the catalog id to read, defaulting to gpqa_diamond. (optional)
- parameter model: (query) Model filters to one model. Empty returns every model measured. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: HistoryOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getBenchmarkHistory(benchmark: String? = nil, model: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> HistoryOut {
return try await getBenchmarkHistoryWithRequestBuilder(benchmark: benchmark, model: model, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns each model's measured score per run over time, oldest first, with the change between runs.
- GET /v1/benchmark/history
- Returns each model's measured score per run over time, oldest first, with the change between runs. This is the counterweight to a leaderboard: the board shows the latest run because that is what \"how good is it\" means, and a single latest number cannot distinguish a model that has always been strong from one that just improved, or from one that regressed after a provider changed something. Both matter for routing, and only one of them is visible on a board. Runs with no id — attempts recorded before runs existed — group under the empty run, which is honestly what they are: one undated measurement.
- Bearer Token:
- type: http
- name: bearer
- parameter benchmark: (query) Benchmark is the catalog id to read, defaulting to gpqa_diamond. (optional)
- parameter model: (query) Model filters to one model. Empty returns every model measured. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<HistoryOut>
*/
open class func getBenchmarkHistoryWithRequestBuilder(benchmark: String? = nil, model: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<HistoryOut> {
let localVariablePath = "/v1/benchmark/history"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"Benchmark": (wrappedValue: benchmark?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"Model": (wrappedValue: model?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<HistoryOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Answers one row per model for the benchmark named — what our own harness measured, beside what the vendor claims, and the gap between them.
- parameter benchmark: (query) Benchmark is the catalog id to read, defaulting to gpqa_diamond. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: Leaderboard
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getBenchmarkLeaderboard(benchmark: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Leaderboard {
return try await getBenchmarkLeaderboardWithRequestBuilder(benchmark: benchmark, apiConfiguration: apiConfiguration).execute().body
}
/**
Answers one row per model for the benchmark named — what our own harness measured, beside what the vendor claims, and the gap between them.
- GET /v1/benchmark/leaderboard
- Answers one row per model for the benchmark named — what our own harness measured, beside what the vendor claims, and the gap between them. The gap is the point of the arena; provider-reported claims have run materially hot against one standardized harness. The two planes are NEVER blended, and that is the rule to read the rows by: a model we have measured but no vendor has claimed for shows published null, a model with only a claim shows measured null, and gap exists only where both do. n is coverage and is not decoration: two measured numbers taken over different item counts are not comparable, so read the row's n before reading its accuracy.
- Bearer Token:
- type: http
- name: bearer
- parameter benchmark: (query) Benchmark is the catalog id to read, defaulting to gpqa_diamond. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Leaderboard>
*/
open class func getBenchmarkLeaderboardWithRequestBuilder(benchmark: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Leaderboard> {
let localVariablePath = "/v1/benchmark/leaderboard"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"benchmark": (wrappedValue: benchmark?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<Leaderboard>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Are the router blends available to compose from — a named set of model arms, the rank they escalate through and the panel width that bounds fan-out — each served by the model layer as enso-<name>.
- parameter apiConfiguration: The configuration for the http request.
- returns: PresetList
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getBenchmarkPresets(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PresetList {
return try await getBenchmarkPresetsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Are the router blends available to compose from — a named set of model arms, the rank they escalate through and the panel width that bounds fan-out — each served by the model layer as enso-<name>.
- GET /v1/benchmark/presets
- Are the router blends available to compose from — a named set of model arms, the rank they escalate through and the panel width that bounds fan-out — each served by the model layer as enso-<name>. Today it answers exactly one row, the reference blend: a worked example written in models we name, published as an example of the FORM. It is deliberately not the composition of a Hanzo-served tier — the tier name exists to abstract that — so fork it and swap arms by what the leaderboard measures on your own tasks rather than reading it as a disclosure.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PresetList>
*/
open class func getBenchmarkPresetsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PresetList> {
let localVariablePath = "/v1/benchmark/presets"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<PresetList>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Records published claims: one to correct a number, many to import a leaderboard.
- parameter putClaimsIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: PutClaimsOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postBenchmarkClaims(putClaimsIn: PutClaimsIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PutClaimsOut {
return try await postBenchmarkClaimsWithRequestBuilder(putClaimsIn: putClaimsIn, apiConfiguration: apiConfiguration).execute().body
}
/**
Records published claims: one to correct a number, many to import a leaderboard.
- POST /v1/benchmark/claims
- Records published claims: one to correct a number, many to import a leaderboard. Every row must carry a Source, because a claim without its citation is a number nobody can check — and an unattributed number in the published plane is indistinguishable from a measurement, which is the one confusion this whole surface is built to prevent. Writes are append-only, so this never destroys the value it replaces. A vendor restating a score leaves both rows on disk, which is how the restating itself becomes visible.
- Bearer Token:
- type: http
- name: bearer
- parameter putClaimsIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PutClaimsOut>
*/
open class func postBenchmarkClaimsWithRequestBuilder(putClaimsIn: PutClaimsIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PutClaimsOut> {
let localVariablePath = "/v1/benchmark/claims"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: putClaimsIn, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<PutClaimsOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Validates a router blend — its name, its arms, the rank they escalate through and the panel fan-out width — and answers 202 with the preset and the enso-<name> it would be served as.
- parameter preset: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: PresetAccepted
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postBenchmarkPresets(preset: Preset, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PresetAccepted {
return try await postBenchmarkPresetsWithRequestBuilder(preset: preset, apiConfiguration: apiConfiguration).execute().body
}
/**
Validates a router blend — its name, its arms, the rank they escalate through and the panel fan-out width — and answers 202 with the preset and the enso-<name> it would be served as.
- POST /v1/benchmark/presets
- Validates a router blend — its name, its arms, the rank they escalate through and the panel fan-out width — and answers 202 with the preset and the enso-<name> it would be served as. It VALIDATES AND ECHOES: the definition is not persisted yet, so a preset accepted here is not one the model layer will resolve. Treat the response as a check on the blend, not a promise to serve it. Defaults fill the shape rather than refusing it: an omitted rank becomes the arms in declared order and a panel below 1 becomes 1. The one real invariant is that rank may only name arms the blend declares — the same rule the model catalog enforces — and a rank naming anything else is a 422 listing exactly which entries were undeclared. A blend with no name or no arms is a 400.
- Bearer Token:
- type: http
- name: bearer
- parameter preset: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PresetAccepted>
*/
open class func postBenchmarkPresetsWithRequestBuilder(preset: Preset, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PresetAccepted> {
let localVariablePath = "/v1/benchmark/presets"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: preset, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<PresetAccepted>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Admits and queues a benchmark run against a model or your own endpoint, and answers 202 with the receipt.
- parameter suite: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: Admission
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postBenchmarkRuns(suite: Suite, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Admission {
return try await postBenchmarkRunsWithRequestBuilder(suite: suite, apiConfiguration: apiConfiguration).execute().body
}
/**
Admits and queues a benchmark run against a model or your own endpoint, and answers 202 with the receipt.
- POST /v1/benchmark/runs
- Admits and queues a benchmark run against a model or your own endpoint, and answers 202 with the receipt. It is an ADMISSION, not a result: the work is done by the harness afterwards and the numbers appear on the leaderboard as it completes them. Cost is bounded by the store rather than by a quota: attempts are append-only and keyed by (benchmark, item, model), so an (item, model) pair already attempted is skipped instead of re-spent, and re-queuing the same run is close to free. Validation is up front and total — a request with neither model nor endpoint is a 400, one with no benchmarks is a 400, and any benchmark id outside the catalog is a 422 naming exactly which ids were unknown, so a typo never silently queues a partial run.
- Bearer Token:
- type: http
- name: bearer
- parameter suite: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Admission>
*/
open class func postBenchmarkRunsWithRequestBuilder(suite: Suite, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Admission> {
let localVariablePath = "/v1/benchmark/runs"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: suite, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<Admission>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
}