runbios-sdk 0.2.14-dev.253 → 0.2.14-dev.254

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -36,7 +36,7 @@ import { Loop } from './resources/loop.js';
36
36
  * SDK version. Sent as part of the User-Agent header.
37
37
  * Must match package.json "version" -- enforced by a contract test.
38
38
  */
39
- export declare const VERSION = "0.2.14-dev.253";
39
+ export declare const VERSION = "0.2.14-dev.254";
40
40
  export declare class RunBiOS {
41
41
  /** Search models, fetch configs, check adapter compatibility. */
42
42
  readonly models: Models;
@@ -75,7 +75,7 @@ export { Training } from './resources/training.js';
75
75
  export { Wallet } from './resources/wallet.js';
76
76
  export { GPU, type GPURecommendation } from './resources/gpu.js';
77
77
  export { Inference, validateChatRequest, parseSSE, buildInferenceRequest, contextSizingBasis, type ContextSizingBasis, CONTEXT_DEFAULT_CEILING, CONTEXT_EDITABLE_FLOOR, type ChatMessage, type FunctionTool, type ChatCompletionParams, type ChatCompletionResponse, type ChatCompletionChunk, type InferenceVerbParams, type CompletionParams, type EmbeddingParams, type RerankParams, type AnthropicMessageParams, type ServerlessUsageWindow, type ServerlessTimeseriesMetric, type ServerlessWorkspaceLimits, type ServerlessUsageEnvelope, type ServerlessUsageOverviewResponse, type ServerlessUsageRowsResponse, type ServerlessUsageTimeseriesResponse, type ServerlessUsageDailyResponse, type ServerlessSavingsTotals, type ServerlessSavingsPeriod, type ServerlessUsageSavingsResponse, } from './resources/inference.js';
78
- export type { BiOSConfig, PaginatedResponse, ApiErrorBody, AvailableGpuAlternative, CapacityMinimumRequirement, InferenceBookingAccepted, Model, ModelSearchParams, ModelSearchResponse, ModelDetailResponse, InferenceModel, InferenceModelListResponse, ModelConfig, Dataset, DatasetListParams, DatasetListResponse, DatasetUploadParams, DatasetPreview, DatasetPreviewParams, DatasetImportHFParams, DatasetRegisterHFParams, DatasetHubSearchParams, DatasetHubPreviewParams, DatasetValidation, DatasetFormatVariant, DatasetFormatSpec, DatasetFormatSpecs, DatasetStorageUsage, TrainingMethod, RLHFAlgorithm, AdapterType, TrainingJobStatus, TrainingStatusFilter, TrainingCreateParams, TrainingListParams, TrainingListResponse, TrainingJob, TrainingMetrics, TrainingResourceMetrics, TrainingDeviceMetrics, MetricPoint, MetricGraphConfig, TrainingCheckpoint, TrainingLogs, TrainingLogEntry, TrainingStopResponse, TrainingResumeResponse, CanonicalTrainingRequest, TrainingPreflightDataset, TrainingPreflightWarning, TrainingPreflightResponse, TrainingCapabilityChoice, TrainingConfigFieldCapability, TrainingCapabilities, GPUChoice, WalletBalance, Transaction, TransactionListResponse, TransactionListParams, GPUInfo, GPUPricingResponse, GPUOptionsParams, TrainingRecommendParams, TrainingAdvisorVerdict, TrainingAdvisorRecommendation, TrainingAdvisorUserShape, TrainingAdvisorJustification, TrainingAdvisorBasis, GPUOption, GPUOptionSuggestion, GPUOptionsResponse, InferenceStatus, InferenceCreateParams, InferenceUpdateParams, InferenceDeployment, InferenceDeploymentSummary, InferenceCreateResponse, InferenceListResponse, InferenceUpdateResponse, InferenceLifecycleResponse, InferenceDeleteResponse, InferenceGPUOptionMarket, InferenceGPUOption, InferenceGPUAlternative, InferenceGPUOptionsParams, InferenceGPUOptionsResponse, InferenceCanonicalRequest, InferencePreflightWarning, InferencePreflightResponse, AdapterCompatibility, AdapterCompatibilityResponse, AdapterCompatibilityParams, SupportedArchitecture, ArchitectureScope, SupportedArchitecturesResponse, ApiKey, ApiKeyScope, ApiKeyIntrospection, Organization, OrgMember, OrgInvite, Workspace, Integration, IntegrationCreateParams, StorageUsage, StorageObject, PromptTokensDetails, ChatCompletionUsage, TrainingCadence, TrainingCombinator, ServingKind, TrainingRulePausedReason, LoopTrainingMethod, TrainType, GradersScope, TrainingTrigger, TrainingRecipe, TrainingRunState, TrainingVerdict, TrainingDecision, NotifyState, EvaluationStatus, EvaluationItemStatus, EvaluationWinner, EvaluationWarningCode, ConsentVia, TrainingToolCall, TrainingMessage, TrainingRuleServing, TrainingGPURung, TrainingRule, TrainingRuleConsent, TrainingRulePreflightRefusal, TrainingRuleKeyRef, TrainingRuleKeyCheck, TrainingRulePreflight, TrainingRuleBuildSpec, TrainingRuleTriggerInput, TrainingRuleTrainingInput, TrainingRuleDeployInput, TrainingRuleMoneyInput, TrainingRuleEvaluationInput, TrainingRulePromotionInput, TrainingRuleAcceptTerms, TrainingRulePreflightRequest, TrainingRuleCreateRequest, TrainingRuleUpdateRequest, TrainingRuleConsentRequest, TrainingRuleListParams, TrainingRunPromoteRequest, TrainingRunRejectRequest, TrainingRunRollbackRequest, TrainingRunCancelRequest, TrainingRunListParams, TrainingRun, TrainingRunSummary, TrainingRunEvent, TrainingRunLinks, TrainingRunActions, EvaluationRef, EvaluationDecoding, EvaluationJudgeDimension, EvaluationDimensionScore, EvaluationGraderScore, EvaluationWarning, EvaluationMargin, JudgeAgreementDimension, JudgeAgreement, Evaluation, EvaluationItemSide, EvaluationItem, EvaluationItemListParams, JudgeAgreementParams, AgentSettings, AgentSettingsRequest, BenchmarkStatus, BenchmarkSourceKind, BenchmarkRunStatus, BenchmarkScoring, BenchmarkDimensionScore, Benchmark, BenchmarkItem, BenchmarkRun, BenchmarkHistoryPoint, BenchmarkSource, BenchmarkCreateParams, BenchmarkListParams, BenchmarkItemListParams, BenchmarkHistoryParams, BenchmarkRetireParams, TrainingRuleBenchmarkRequest, InferenceAlias, InferenceAliasRequest, TrainingRuleListResponse, TrainingRuleResponse, TrainingRuleMutationResponse, TrainingRuleDeleteResponse, TrainingRunListResponse, TrainingRunResponse, TrainingRunActionResponse, EvaluationItemsResponse, AgentSettingsResponse, InferenceAliasListResponse, InferenceAliasResponse, InferenceAliasDeleteResponse, BenchmarkListResponse, BenchmarkItemsResponse, BenchmarkHistoryResponse, TrainingRuleRunRefusalCode, TrainingRuleMonthlyLimitRefusal, LoopDatasetDeleteRefusalCode, PipelineStatus, PipelineRecipeExploration, PipelineActiveRun, PipelineVersion, Pipeline, PipelineListResponse, PipelineResponse, } from './types.js';
78
+ export type { BiOSConfig, PaginatedResponse, ApiErrorBody, AvailableGpuAlternative, CapacityMinimumRequirement, InferenceBookingAccepted, Model, ModelSearchParams, ModelSearchResponse, ModelDetailResponse, InferenceModel, InferenceModelListResponse, ModelConfig, Dataset, DatasetListParams, DatasetListResponse, DatasetUploadParams, DatasetPreview, DatasetPreviewParams, DatasetImportHFParams, DatasetRegisterHFParams, DatasetHubSearchParams, DatasetHubPreviewParams, DatasetValidation, DatasetFormatVariant, DatasetFormatSpec, DatasetFormatSpecs, DatasetStorageUsage, TrainingMethod, RLHFAlgorithm, AdapterType, TrainingJobStatus, TrainingStatusFilter, TrainingCreateParams, TrainingListParams, TrainingListResponse, TrainingJob, TrainingMetrics, TrainingResourceMetrics, TrainingDeviceMetrics, MetricPoint, MetricGraphConfig, TrainingCheckpoint, TrainingLogs, TrainingLogEntry, TrainingStopResponse, TrainingResumeResponse, CanonicalTrainingRequest, TrainingPreflightDataset, TrainingPreflightWarning, TrainingPreflightResponse, TrainingCapabilityChoice, TrainingConfigFieldCapability, TrainingCapabilities, GPUChoice, WalletBalance, Transaction, TransactionListResponse, TransactionListParams, GPUInfo, GPUPricingResponse, GPUOptionsParams, TrainingRecommendParams, TrainingAdvisorVerdict, TrainingAdvisorRecommendation, TrainingAdvisorUserShape, TrainingAdvisorJustification, TrainingAdvisorBasis, GPUOption, GPUOptionSuggestion, GPUOptionsResponse, InferenceStatus, InferenceCreateParams, InferenceUpdateParams, InferenceDeployment, InferenceDeploymentSummary, InferenceCreateResponse, InferenceListResponse, InferenceUpdateResponse, InferenceLifecycleResponse, InferenceDeleteResponse, InferenceGPUOptionMarket, InferenceGPUOption, InferenceGPUAlternative, InferenceGPUOptionsParams, InferenceGPUOptionsResponse, InferenceCanonicalRequest, InferencePreflightWarning, InferencePreflightResponse, AdapterCompatibility, AdapterCompatibilityResponse, AdapterCompatibilityParams, SupportedArchitecture, ArchitectureScope, SupportedArchitecturesResponse, ApiKey, ApiKeyScope, ApiKeyIntrospection, Organization, OrgMember, OrgInvite, Workspace, Integration, IntegrationCreateParams, StorageUsage, StorageObject, PromptTokensDetails, ChatCompletionUsage, TrainingCadence, TrainingCombinator, ServingKind, TrainingRulePausedReason, LoopTrainingMethod, TrainType, GradersScope, TrainingTrigger, TrainingRecipe, TrainingRunState, TrainingVerdict, TrainingDecision, NotifyState, EvaluationStatus, EvaluationItemStatus, EvaluationWinner, EvaluationWarningCode, ConsentVia, TrainingToolCall, TrainingMessage, TrainingRuleServing, TrainingGPURung, TrainingRule, TrainingRuleConsent, TrainingRulePreflightRefusal, TrainingRuleKeyRef, TrainingRuleKeyCheck, TrainingRulePreflight, TrainingRuleBuildSpec, TrainingRuleTriggerInput, TrainingRuleTrainingInput, TrainingRuleDeployInput, TrainingRuleMoneyInput, TrainingRuleEvaluationInput, TrainingRulePromotionInput, TrainingRuleAcceptTerms, TrainingRulePreflightRequest, TrainingRuleCreateRequest, TrainingRuleUpdateRequest, TrainingRuleConsentRequest, TrainingRuleListParams, TrainingRunPromoteRequest, TrainingRunRejectRequest, TrainingRunRollbackRequest, TrainingRunCancelRequest, TrainingRunListParams, TrainingRun, TrainingRunSummary, TrainingRunEvent, TrainingRunLinks, TrainingRunActions, EvaluationRef, EvaluationDecoding, EvaluationJudgeDimension, EvaluationDimensionScore, EvaluationGraderScore, EvaluationWarning, EvaluationMargin, JudgeAgreementDimension, JudgeAgreement, Evaluation, EvaluationItemSide, EvaluationItem, EvaluationItemListParams, JudgeAgreementParams, AgentSettings, AgentSettingsRequest, BenchmarkStatus, BenchmarkSourceKind, BenchmarkRunStatus, BenchmarkScoring, BenchmarkDimensionScore, Benchmark, BenchmarkItem, BenchmarkRun, BenchmarkHistoryPoint, BenchmarkSource, BenchmarkCreateParams, BenchmarkListParams, BenchmarkItemListParams, BenchmarkHistoryParams, BenchmarkRetireParams, TrainingRuleBenchmarkRequest, InferenceAlias, InferenceAliasRequest, TrainingRuleListResponse, TrainingRuleResponse, TrainingRuleMutationResponse, TrainingRuleDeleteResponse, TrainingRunListResponse, TrainingRunResponse, TrainingRunActionResponse, EvaluationItemsResponse, AgentSettingsResponse, InferenceAliasListResponse, InferenceAliasResponse, InferenceAliasDeleteResponse, BenchmarkListResponse, BenchmarkItemsResponse, BenchmarkHistoryResponse, TrainingRuleRunRefusalCode, TrainingRuleSaveRefusalCode, TrainingRuleMonthlyLimitRefusal, LoopDatasetDeleteRefusalCode, PipelineStatus, PipelineRecipeExploration, PipelineActiveRun, PipelineVersion, Pipeline, PipelineListResponse, PipelineResponse, } from './types.js';
79
79
  /** The closed set of run states a training run never leaves. */
80
80
  export { TERMINAL_RUN_STATES } from './types.js';
81
81
  /** The most versions a pipeline may be set to make. */
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ import { Loop } from './resources/loop.js';
36
36
  * SDK version. Sent as part of the User-Agent header.
37
37
  * Must match package.json "version" -- enforced by a contract test.
38
38
  */
39
- export const VERSION = '0.2.14-dev.253';
39
+ export const VERSION = '0.2.14-dev.254';
40
40
  export class RunBiOS {
41
41
  /** Search models, fetch configs, check adapter compatibility. */
42
42
  models;
@@ -576,6 +576,10 @@ export declare class Loop {
576
576
  * `model_revision` is empty unless training-service actually pinned a
577
577
  * commit; test `unreachable.length > 0` to tell a degraded pass from a
578
578
  * refusal.
579
+ *
580
+ * A `TRAINING_NOT_ENABLED` refusal is neither: training is in beta and this
581
+ * organisation does not hold the grant. It is in `refusals`, never in
582
+ * `unreachable`, and nothing in the request can lift it.
579
583
  */
580
584
  preflightTrainingRule(params: TrainingRulePreflightRequest): Promise<TrainingRulePreflight>;
581
585
  /**
@@ -598,6 +602,10 @@ export declare class Loop {
598
602
  * `terms_version` they were shown. Do not invent ceilings or price caps on
599
603
  * their behalf.
600
604
  *
605
+ * Refused `409 TRAINING_NOT_ENABLED`, with nothing saved, while training is
606
+ * in beta and this organisation does not hold the grant: do not retry, ask
607
+ * the platform team to enable it. See `TrainingRuleSaveRefusalCode`.
608
+ *
601
609
  * @example
602
610
  * ```ts
603
611
  * const estimate = await client.loop.preflightTrainingRule(draft);
@@ -639,6 +647,12 @@ export declare class Loop {
639
647
  * `consent_required`, and carries a fresh `preflight` with the new figures.
640
648
  * Pass `expected_revision` to be refused with `REVISION_MISMATCH` rather
641
649
  * than overwrite an edit somebody else made in the meantime.
650
+ *
651
+ * Switching a rule on, switching it into preference training or carrying
652
+ * `accept_terms` re-runs the preflight, and can be refused
653
+ * `409 TRAINING_NOT_ENABLED` like a create. A rule paused
654
+ * `training_not_enabled` is started again by a save of it once the
655
+ * organisation has been enabled.
642
656
  */
643
657
  updateTrainingRule(id: string, params: TrainingRuleUpdateRequest): Promise<TrainingRuleMutationResponse>;
644
658
  /**
@@ -655,7 +669,8 @@ export declare class Loop {
655
669
  * {@link preflightTrainingRule} or from the `preflight` on the update reply,
656
670
  * and send the `revision` those figures belong to. A stale revision is
657
671
  * refused with `409`, which is the point: it means the amounts moved again
658
- * after they were read.
672
+ * after they were read. `409 TRAINING_NOT_ENABLED` means training is in beta
673
+ * and this organisation does not hold the grant.
659
674
  */
660
675
  consentTrainingRule(id: string, params: TrainingRuleConsentRequest): Promise<TrainingRule>;
661
676
  /**
@@ -785,6 +785,10 @@ export class Loop {
785
785
  * `model_revision` is empty unless training-service actually pinned a
786
786
  * commit; test `unreachable.length > 0` to tell a degraded pass from a
787
787
  * refusal.
788
+ *
789
+ * A `TRAINING_NOT_ENABLED` refusal is neither: training is in beta and this
790
+ * organisation does not hold the grant. It is in `refusals`, never in
791
+ * `unreachable`, and nothing in the request can lift it.
788
792
  */
789
793
  async preflightTrainingRule(params) {
790
794
  return this._http.fetchPost('/api/loop/training-rules/preflight', params);
@@ -809,6 +813,10 @@ export class Loop {
809
813
  * `terms_version` they were shown. Do not invent ceilings or price caps on
810
814
  * their behalf.
811
815
  *
816
+ * Refused `409 TRAINING_NOT_ENABLED`, with nothing saved, while training is
817
+ * in beta and this organisation does not hold the grant: do not retry, ask
818
+ * the platform team to enable it. See `TrainingRuleSaveRefusalCode`.
819
+ *
812
820
  * @example
813
821
  * ```ts
814
822
  * const estimate = await client.loop.preflightTrainingRule(draft);
@@ -873,6 +881,12 @@ export class Loop {
873
881
  * `consent_required`, and carries a fresh `preflight` with the new figures.
874
882
  * Pass `expected_revision` to be refused with `REVISION_MISMATCH` rather
875
883
  * than overwrite an edit somebody else made in the meantime.
884
+ *
885
+ * Switching a rule on, switching it into preference training or carrying
886
+ * `accept_terms` re-runs the preflight, and can be refused
887
+ * `409 TRAINING_NOT_ENABLED` like a create. A rule paused
888
+ * `training_not_enabled` is started again by a save of it once the
889
+ * organisation has been enabled.
876
890
  */
877
891
  async updateTrainingRule(id, params) {
878
892
  return this._http.fetchPut(`/api/loop/training-rules/${encodeURIComponent(id)}`, params);
@@ -891,7 +905,8 @@ export class Loop {
891
905
  * {@link preflightTrainingRule} or from the `preflight` on the update reply,
892
906
  * and send the `revision` those figures belong to. A stale revision is
893
907
  * refused with `409`, which is the point: it means the amounts moved again
894
- * after they were read.
908
+ * after they were read. `409 TRAINING_NOT_ENABLED` means training is in beta
909
+ * and this organisation does not hold the grant.
895
910
  */
896
911
  async consentTrainingRule(id, params) {
897
912
  const res = await this._http.fetchPost(`/api/loop/training-rules/${encodeURIComponent(id)}/consent`, params);
package/dist/types.d.ts CHANGED
@@ -3146,7 +3146,13 @@ export type TrainingCombinator = 'and' | 'or';
3146
3146
  export type ServingKind = 'serverless_slug' | 'deployment';
3147
3147
  export type TrainingRulePausedReason = 'consent_invalid' | 'insufficient_funds' | 'authorizer_not_member' | 'model_not_trainable' | 'platform_capacity'
3148
3148
  /** A peer was unreachable when the rule was saved, so it has not been validated yet. */
3149
- | 'validation_pending';
3149
+ | 'validation_pending'
3150
+ /**
3151
+ * Training is in beta and the rule's organisation does not hold the grant: a
3152
+ * run was refused with the platform's pre-launch gate. Nothing on the rule is
3153
+ * wrong; the platform team enables training, then a member saves the rule.
3154
+ */
3155
+ | 'training_not_enabled';
3150
3156
  /**
3151
3157
  * How a training rule trains, on the wire of the automatic-training routes.
3152
3158
  *
@@ -4229,6 +4235,25 @@ export interface TrainingRuleBenchmarkRequest {
4229
4235
  * `train_rows`, `holdout_rows` and the `floor` it needed.
4230
4236
  */
4231
4237
  export type TrainingRuleRunRefusalCode = 'CONSENT_REQUIRED' | 'RULE_PAUSED' | 'RUN_ACTIVE' | 'VERSION_LIMIT_REACHED' | 'MONTHLY_LIMIT_REACHED' | 'AGENT_OFF' | 'NOT_ENOUGH_ROWS';
4238
+ /**
4239
+ * The machine codes a SAVE of a training rule is refused with when the
4240
+ * preflight it runs refuses: `createTrainingRule`, an `updateTrainingRule`
4241
+ * that switches a rule on or into preference training or carries
4242
+ * `accept_terms`, and `consentTrainingRule`. Every other preflight refusal is
4243
+ * a `400` carrying the peer's own sentence; `preflightTrainingRule` answers
4244
+ * `200` with the same codes in `refusals`.
4245
+ *
4246
+ * - `TRAINING_NOT_ENABLED` (409): training is in beta and this organisation
4247
+ * does not hold the grant. Nothing is saved and nothing in the request can
4248
+ * lift it, so do not retry: ask the platform team to enable training for
4249
+ * the organisation. It is answered ahead of every other refusal. A rule that
4250
+ * meets it at fire time is paused `training_not_enabled` instead (see
4251
+ * {@link TrainingRulePausedReason}).
4252
+ * - `METHOD_NOT_ENABLED` (422): a training method the platform has not enabled.
4253
+ * - `CEILING_TOO_LOW` (422): a ceiling cannot buy the minimum hours at the
4254
+ * accepted price cap.
4255
+ */
4256
+ export type TrainingRuleSaveRefusalCode = 'TRAINING_NOT_ENABLED' | 'METHOD_NOT_ENABLED' | 'CEILING_TOO_LOW';
4232
4257
  /**
4233
4258
  * The machine codes `deleteDataset` can be refused with.
4234
4259
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runbios-sdk",
3
- "version": "0.2.14-dev.253",
3
+ "version": "0.2.14-dev.254",
4
4
  "description": "Official TypeScript SDK for the Run BiOS training and deployment platform API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",