Skip to content
中文

ModelChoiceIndex ​

SUPPORT · interface · Type contract

Minimal selector shape used while filtering the provider response choices.

Import ​

ts
import type { ModelChoiceIndex } from '@jangts/agent-core/support';
js
/** @typedef {import('@jangts/agent-core/support').ModelChoiceIndex} ModelChoiceIndex */

Other public entry points:@jangts/agent-core/types, @jangts/agent-core/structs, @jangts/agent-core/support, @jangts/agent-core/support/model.

Definition ​

ts
interface ModelChoiceIndex

Field structure ​

FieldTypeRequiredDescription
indexnumberRequiredSee the type definition and usage context.

Using the type ​

Read the contract at the call site ​

ts
import type { ModelChoiceIndex } from '@jangts/agent-core/support';

// Keep the original contract at the call site; TS and JS share the same runtime behavior.
function inspect(value: ModelChoiceIndex) {
  return value.index;
}
js
/** @param {import('@jangts/agent-core/support').ModelChoiceIndex} value */
function inspect(value) {
  return value.index;
}

API reference, usage examples and developer guides.