runbios-sdk 0.2.19-rc.279 → 0.2.20-dev.283

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/client.js CHANGED
@@ -344,7 +344,7 @@ export class HttpClient {
344
344
  constructor(config) {
345
345
  // Default host stays api.runbios.ai for now; cutover to api.runbios.ai is
346
346
  // planned once its DNS exists.
347
- this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api-staging.runbios.ai').replace(/\/+$/, '');
347
+ this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api-dev.runbios.ai').replace(/\/+$/, '');
348
348
  this.apiKey = config.apiKey ?? envApiKey();
349
349
  this.accessToken = config.accessToken;
350
350
  this.orgId = config.orgId;
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.19-rc.279";
39
+ export declare const VERSION = "0.2.20-dev.283";
40
40
  export declare class RunBiOS {
41
41
  /** Search models, fetch configs, check adapter compatibility. */
42
42
  readonly models: Models;
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.19-rc.279';
39
+ export const VERSION = '0.2.20-dev.283';
40
40
  export class RunBiOS {
41
41
  /** Search models, fetch configs, check adapter compatibility. */
42
42
  models;
@@ -336,7 +336,7 @@ export class Inference {
336
336
  this.key = config.inferenceKey || envInferenceKey() || envApiKey();
337
337
  // Same default host as HttpClient (api.runbios.ai); api.runbios.ai cutover
338
338
  // is planned once its DNS exists — update both call sites together.
339
- this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api-staging.runbios.ai').replace(/\/+$/, '');
339
+ this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api-dev.runbios.ai').replace(/\/+$/, '');
340
340
  this.timeout = config.timeout ?? 900_000;
341
341
  this._http = http;
342
342
  }
@@ -402,7 +402,9 @@ export declare class Loop {
402
402
  * numbers `minimums` shows. 503 `AGENT_COULD_NOT_START` means the key the
403
403
  * attempt would be scored with could not be renewed just then: nothing was
404
404
  * started, so press train now again in a minute. Every refusal is a
405
- * `TrainingRuleRunRefusalCode`.
405
+ * `TrainingRuleRunRefusalCode`. When the attempt in flight is waiting for
406
+ * GPUs to compare (`active_run.state` `waiting_gpus`), this books its two
407
+ * comparison machines again at once instead of starting another attempt.
406
408
  */
407
409
  runPipeline(id: string): Promise<PipelineMutationResponse>;
408
410
  /**
@@ -555,7 +555,9 @@ export class Loop {
555
555
  * numbers `minimums` shows. 503 `AGENT_COULD_NOT_START` means the key the
556
556
  * attempt would be scored with could not be renewed just then: nothing was
557
557
  * started, so press train now again in a minute. Every refusal is a
558
- * `TrainingRuleRunRefusalCode`.
558
+ * `TrainingRuleRunRefusalCode`. When the attempt in flight is waiting for
559
+ * GPUs to compare (`active_run.state` `waiting_gpus`), this books its two
560
+ * comparison machines again at once instead of starting another attempt.
559
561
  */
560
562
  async runPipeline(id) {
561
563
  return this._http.fetchPost(`/api/loop/pipelines/${encodeURIComponent(id)}/run`, {});
package/dist/types.d.ts CHANGED
@@ -8,13 +8,13 @@ export interface BiOSConfig {
8
8
  orgId?: string;
9
9
  /** Workspace ID. Optional when using API keys (resolved from the key). Can override for multi-workspace keys. */
10
10
  workspaceId?: string;
11
- /** Base URL for the API. Falls back to the RUNBIOS_BASE_URL environment variable (legacy: BIOS_BASE_URL), then the canonical https://api-staging.runbios.ai hostname. */
11
+ /** Base URL for the API. Falls back to the RUNBIOS_BASE_URL environment variable (legacy: BIOS_BASE_URL), then the canonical https://api-dev.runbios.ai hostname. */
12
12
  baseUrl?: string;
13
13
  /** Request timeout in milliseconds. Defaults to 30000. */
14
14
  timeout?: number;
15
15
  /** Default per-deployment inference key. Can be overridden per inference call. */
16
16
  inferenceKey?: string;
17
- /** Inference base URL. Defaults to baseUrl, then https://api-staging.runbios.ai. */
17
+ /** Inference base URL. Defaults to baseUrl, then https://api-dev.runbios.ai. */
18
18
  inferenceBaseUrl?: string;
19
19
  /** End-to-end inference timeout in milliseconds. Defaults to 15 minutes. */
20
20
  inferenceTimeout?: number;
@@ -781,10 +781,24 @@ export interface TrainingJob {
781
781
  checkpoint_count?: number;
782
782
  /** The current machine attempt's per-phase records, in canonical order. */
783
783
  phases?: TrainingJobPhase[];
784
- /** Estimated seconds until the job finishes (absent when unknown). */
784
+ /**
785
+ * Estimated seconds remaining (absent when unknown). What it covers is
786
+ * `eta_scope`: before step 1 only the time until training starts.
787
+ */
785
788
  eta_seconds?: number;
786
- /** How the ETA was derived: measured on the machine, or from historical medians. */
789
+ /**
790
+ * How the ETA was derived: `measured` from this job's own live rate
791
+ * (training: its own steps since the first), or `historical` from past runs
792
+ * of the same model on the same GPU (else the GPU).
793
+ */
787
794
  eta_confidence?: 'measured' | 'historical';
795
+ /**
796
+ * What `eta_seconds` covers: `until_training` before step 1 (startup
797
+ * phases only; training time is measured from the run's own steps, never
798
+ * guessed), `run` once training has started (remaining training plus what
799
+ * follows it).
800
+ */
801
+ eta_scope?: 'until_training' | 'run';
788
802
  /** Most recent per-phase update time. */
789
803
  last_phase_update_at?: string;
790
804
  /**
@@ -1663,6 +1677,12 @@ export interface InferenceDeployment {
1663
1677
  base_model_revision?: string;
1664
1678
  immutable_base_model_source?: string;
1665
1679
  serving_mode?: 'full' | 'adapter' | 'merged';
1680
+ /**
1681
+ * Only on an adapter deployment: the `model` that asks its BASE weights with
1682
+ * no adapter, `<name>:base`, on /chat/completions and /completions. A
1683
+ * deployment with no adapter has no separate base and refuses `:base`.
1684
+ */
1685
+ base_weights_model?: string;
1666
1686
  supports_tool_calls?: boolean;
1667
1687
  tool_call_parser?: InferenceToolCallParser | null;
1668
1688
  reasoning_parser?: InferenceReasoningParser | null;
@@ -2866,7 +2886,18 @@ export interface TrainingRecipe {
2866
2886
  lora_rank: number | null;
2867
2887
  lora_alpha: number | null;
2868
2888
  }
2869
- export type TrainingRunState = 'built' | 'registering' | 'dataset_validating' | 'preflighting' | 'job_creating' | 'training' | 'checkpoint_ready' | 'candidate_booking' | 'candidate_running' | 'evaluating' | 'reported' | 'awaiting_review' | 'promoting' | 'waiting_funds' | 'promoted' | 'rejected' | 'expired' | 'failed' | 'budget_stopped' | 'cancelled' | 'superseded' | 'rolled_back';
2889
+ export type TrainingRunState = 'built' | 'registering' | 'dataset_validating' | 'preflighting' | 'job_creating' | 'training' | 'checkpoint_ready' | 'candidate_booking' | 'candidate_running' | 'evaluating' | 'reported' | 'awaiting_review' | 'promoting' | 'waiting_funds'
2890
+ /**
2891
+ * Trained, and waiting for GPUs to run the new model and the one it is
2892
+ * compared with side by side: one machine got a GPU and the other did not
2893
+ * within 20 minutes, so both were stopped. Each try can bill the machine
2894
+ * that got a GPU for up to those 20 minutes; nothing bills between tries.
2895
+ * It keeps what it trained, books both again after 30 minutes, then 1, 2
2896
+ * and 4 hours, and ends (`failed`, `COMPARISON_NO_GPUS`) after four tries or
2897
+ * 24 hours (`COMPARISON_WORKSPACE_FULL` when what was missing was room in
2898
+ * the workspace). Train now books them again at once.
2899
+ */
2900
+ | 'waiting_gpus' | 'promoted' | 'rejected' | 'expired' | 'failed' | 'budget_stopped' | 'cancelled' | 'superseded' | 'rolled_back';
2870
2901
  /** The closed set a run never leaves. */
2871
2902
  export declare const TERMINAL_RUN_STATES: readonly TrainingRunState[];
2872
2903
  export type TrainingVerdict = 'better' | 'not_better' | 'inconclusive' | 'not_evaluated';
@@ -2957,7 +2988,19 @@ export interface TrainingRun {
2957
2988
  */
2958
2989
  error_next_step: string | null;
2959
2990
  billed_training_cents: number;
2991
+ /**
2992
+ * The comparison machines: each from the first time it was on a GPU to its
2993
+ * stop, less any time back in the GPU queue, at the price the platform
2994
+ * placed it at.
2995
+ */
2960
2996
  billed_candidate_cents: number;
2997
+ /**
2998
+ * True when a comparison machine was charged: the figure is then the most
2999
+ * it can have cost ("up to"), since it counts each machine from its first
3000
+ * boot where the platform bills from its first answer (and at the hourly
3001
+ * cap when no placement price was reported).
3002
+ */
3003
+ billed_candidate_up_to: boolean;
2961
3004
  spent_eval_cents: number;
2962
3005
  train_rows: number | null;
2963
3006
  holdout_rows: number | null;
@@ -3049,6 +3092,8 @@ export interface TrainingRunSummary {
3049
3092
  holdout_rows: number | null;
3050
3093
  billed_training_cents: number;
3051
3094
  billed_candidate_cents: number;
3095
+ /** See {@link TrainingRun.billed_candidate_up_to}. */
3096
+ billed_candidate_up_to: boolean;
3052
3097
  spent_eval_cents: number;
3053
3098
  /** The fourth money column. A row that leaves it out adds up short. */
3054
3099
  benchmark_spent_cents: number;
@@ -3528,8 +3573,9 @@ export interface TrainingRuleMonthlyLimitRefusal {
3528
3573
  monthly_ceiling_cents: number;
3529
3574
  /**
3530
3575
  * The most one attempt of this rule may spend: its training, its comparison
3531
- * machine and its judging, and -- on a pipeline, while no version is live --
3532
- * the base model's own comparison machine beside the new model's.
3576
+ * machine and its judging. While no version is live that machine also
3577
+ * answers as the base model, so a pipeline's own attempt counts one; a
3578
+ * challenger's attempt also counts the base model's own machine beside it.
3533
3579
  */
3534
3580
  run_max_cents: number;
3535
3581
  /**
@@ -3574,6 +3620,11 @@ export interface PipelineActiveRun {
3574
3620
  gpu_seconds: number | null;
3575
3621
  /** What it has been billed so far, in cents. */
3576
3622
  cost_cents: number;
3623
+ /**
3624
+ * True when a comparison machine was charged in `cost_cents`: the figure is
3625
+ * the most it can have cost, so show it as "up to".
3626
+ */
3627
+ cost_up_to: boolean;
3577
3628
  /** The version number it will take if it is put live. */
3578
3629
  will_be_version: number;
3579
3630
  /** Always null: nothing in flight is a version yet. */
@@ -3646,6 +3697,14 @@ export interface PipelineVersion {
3646
3697
  * not what it did.
3647
3698
  */
3648
3699
  cost_includes_candidate_ceiling: boolean;
3700
+ /**
3701
+ * True when `cost_cents` is the most the version can have cost rather than
3702
+ * what it did: its comparison machines at their ceilings
3703
+ * (`cost_includes_candidate_ceiling`), or one charged (counted from its
3704
+ * first boot, where the platform bills from its first answer). Show it as
3705
+ * "up to".
3706
+ */
3707
+ cost_up_to: boolean;
3649
3708
  /** Machine time the attempt held (training and comparison); null when unknown. */
3650
3709
  gpu_seconds: number | null;
3651
3710
  created_at: string;
@@ -3694,6 +3753,8 @@ export interface PipelineAttempt {
3694
3753
  gpu_seconds: number | null;
3695
3754
  /** As the versions are priced once it has ended; as recorded so far while it runs. */
3696
3755
  cost_cents: number;
3756
+ /** See {@link PipelineVersion.cost_up_to}. */
3757
+ cost_up_to: boolean;
3697
3758
  verdict: TrainingVerdict | null;
3698
3759
  win_rate: number | null;
3699
3760
  evaluation_id: string | null;
@@ -3823,9 +3884,9 @@ export interface Pipeline {
3823
3884
  * this UTC calendar month -- the figure the limit is enforced against. An
3824
3885
  * upper bound, not an exact spend. A run counts toward the month it was
3825
3886
  * created in, and a run still in progress also counts toward the current
3826
- * month, at the most it may cost (as `run_max_cents` counts it, the base
3827
- * model's comparison machine included) or what it has been billed when that
3828
- * is more. A finished run counts what it was billed, and its comparison
3887
+ * month, at the most it may cost (as `run_max_cents` counts it, a base
3888
+ * model's machine included where the attempt has one of its own) or what it
3889
+ * has been billed when that is more. A finished run counts what it was billed, and its comparison
3829
3890
  * machines are billed at the most they could have cost (each machine's
3830
3891
  * hourly cap for the time it was up, never more than its own amount). A run created in
3831
3892
  * an earlier month that finishes in this one counts here only while it is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runbios-sdk",
3
- "version": "0.2.19-rc.279",
3
+ "version": "0.2.20-dev.283",
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",