@alia.onl/sdk 7.2.0 → 7.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alia.onl/sdk",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "description": "Alia AI chat SDK — reusable chat UI, voice, and streaming components for Oxy apps",
5
5
  "main": "src/index.ts",
6
6
  "react-native": "src/index.ts",
@@ -8,6 +8,7 @@
8
8
  "types": "src/index.ts",
9
9
  "exports": {
10
10
  ".": "./src/index.ts",
11
+ "./content": "./src/lib/content-utils.ts",
11
12
  "./voice": "./src/voice.ts",
12
13
  "./package.json": "./package.json"
13
14
  },
@@ -44,8 +45,8 @@
44
45
  "peerDependencies": {
45
46
  "react": "^19.2.3",
46
47
  "react-native": "^0.86.0",
47
- "@oxyhq/core": "23.3.0",
48
- "@oxyhq/services": "31.0.0",
48
+ "@oxyhq/core": "23.3.1",
49
+ "@oxyhq/services": "31.0.1",
49
50
  "@react-native-async-storage/async-storage": "^2.2.0",
50
51
  "socket.io-client": "^4.8.3",
51
52
  "expo-font": "^57.0.0",
@@ -3,7 +3,7 @@
3
3
  * workstream 5).
4
4
  *
5
5
  * Every surface used to hardcode an `alia-*` identifier as its default —
6
- * `useAliaChat` sent `kaana-v1`, `useTTS` and `useVoiceRoom` sent `kaana-v1-voice`
6
+ * `useAliaChat` sent `route:auto`, `useTTS` and `useVoiceRoom` sent `route:voice`
7
7
  * — which meant a retired identifier became a 400 in a consumer's app with
8
8
  * nothing the consumer could do about it, since the string was baked into the
9
9
  * package they installed. This module is how the SDK asks the server what it
@@ -200,6 +200,7 @@ export async function resolveModelId(
200
200
  accessToken?: string,
201
201
  preferredId?: string,
202
202
  ): Promise<string> {
203
+ if (requestedId.startsWith('mode:')) return requestedId;
203
204
  try {
204
205
  const entries = await fetchCatalogue(apiUrl, accessToken);
205
206
  return resolveSelection(requestedId, entries, preferredId).effectiveId;
package/src/lib/config.ts CHANGED
@@ -11,12 +11,11 @@
11
11
  *
12
12
  * Overridable per build so a consumer is not stranded on a retired identifier
13
13
  * until the SDK ships a new version, which is the failure the hardcoded
14
- * `'kaana-v1'` inside `useAliaChat` used to guarantee.
14
+ * `'route:auto'` inside `useAliaChat` used to guarantee.
15
15
  */
16
16
 
17
17
  /** What a chat request asks for when the caller names no model. Checked against the catalogue. */
18
- export const PREFERRED_CHAT_MODEL_ID =
19
- process.env.EXPO_PUBLIC_ALIA_DEFAULT_MODEL ?? 'profile:v1';
18
+ export const PREFERRED_CHAT_MODEL_ID = 'mode:auto';
20
19
 
21
20
  /**
22
21
  * What speech synthesis and the voice session ask for.
@@ -34,5 +33,4 @@ export const PREFERRED_CHAT_MODEL_ID =
34
33
  * Resolving it properly needs a catalogue that describes voice capability as a
35
34
  * first-class filter; that is workstream 5's business, not a thing to fake here.
36
35
  */
37
- export const PREFERRED_VOICE_MODEL_ID =
38
- process.env.EXPO_PUBLIC_ALIA_VOICE_MODEL ?? 'profile:v1-voice';
36
+ export const PREFERRED_VOICE_MODEL_ID = 'route:voice';