@byte_fluffy/nexra-sdk 0.1.0-alpha.35 → 0.1.0-alpha.37
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/README.md +35 -0
- package/dist/catalog.js +2 -2
- package/dist/{chunk-R4BEO26Q.js → chunk-AAGTZN2G.js} +25 -0
- package/dist/{chunk-HVCSMBOG.js → chunk-ENL3IGRX.js} +1284 -39
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/language.js +2 -2
- package/dist/media.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{voices-bcGBcfH-.d.ts → voices-CFRCuodH.d.ts} +18 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,6 +37,41 @@ available from `@byte_fluffy/nexra-sdk/media`.
|
|
|
37
37
|
The default API base URL is `https://api.nexra-ai.com/v1`. When overriding
|
|
38
38
|
`baseUrl`, include the `/v1` API prefix.
|
|
39
39
|
|
|
40
|
+
## Banana 2.1
|
|
41
|
+
|
|
42
|
+
Use `google/gemini-nano-banana-2.1` for Banana 2.1. The model supports
|
|
43
|
+
`1K` (default), `2K`, and `4K`, fifteen aspect ratios, and up to fourteen
|
|
44
|
+
source/reference images. It does not support `512`, `count`, or `seed`.
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
const modelId = "google/gemini-nano-banana-2.1";
|
|
48
|
+
const input: NexraImageGenerateInput = {
|
|
49
|
+
content: [{ type: "text", text: "A paper boat on a blue table", role: "prompt" }],
|
|
50
|
+
resolution: "2K",
|
|
51
|
+
aspect_ratio: "16:9",
|
|
52
|
+
};
|
|
53
|
+
const quote = await nexra.catalog.quote({ modelId, operation: "image.generate", input });
|
|
54
|
+
const result = await nexra.run(modelId, input, { quoteToken: quote.quoteToken });
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The server also exposes the Google Native `generateContent` endpoint at
|
|
58
|
+
`/v1/projects/{project}/locations/global/publishers/google/models/gemini-nano-banana-2.1:generateContent`.
|
|
59
|
+
Use the Native `contents` and `generationConfig` payload for direct HTTP calls;
|
|
60
|
+
SDK media calls use the Nexra contract shown above.
|
|
61
|
+
|
|
62
|
+
## DeepSeek model identity correction
|
|
63
|
+
|
|
64
|
+
`0.1.0-alpha.36` replaces `ctyun/deepseek-v4-1-flash` with
|
|
65
|
+
`deepseek/deepseek-v4-1-flash`. Update model IDs in SDK calls, direct HTTP
|
|
66
|
+
requests, persisted selections and catalog caches. Upgrading the SDK does not
|
|
67
|
+
rewrite a hardcoded model ID. The previous public ID and `deepseek-v4.1-flash`
|
|
68
|
+
alias are retired; neither resolves in the new catalog.
|
|
69
|
+
|
|
70
|
+
The server rollout must apply migration `0056_deepseek_model_identity` before
|
|
71
|
+
syncing the new model definition. The model UUID, channel-specific upstream IDs,
|
|
72
|
+
routes, prices and original request history remain attached to the same model.
|
|
73
|
+
The API paths and native payload shapes remain unchanged.
|
|
74
|
+
|
|
40
75
|
## Error contract migration
|
|
41
76
|
|
|
42
77
|
`0.1.0-alpha.30` introduces the flat public error response and matching SDK
|
package/dist/catalog.js
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
listModelSpecs,
|
|
10
10
|
projectMediaGeometry,
|
|
11
11
|
resolveNexraLanguageReasoning
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-ENL3IGRX.js";
|
|
13
|
+
import "./chunk-AAGTZN2G.js";
|
|
14
14
|
export {
|
|
15
15
|
CatalogClient,
|
|
16
16
|
applyMediaGeometry,
|
|
@@ -694,6 +694,31 @@ function isTerminalTaskStatus(status) {
|
|
|
694
694
|
return status === "succeeded" || status === "failed" || status === "cancelled";
|
|
695
695
|
}
|
|
696
696
|
|
|
697
|
+
// ../contracts/src/usage-query-reference.ts
|
|
698
|
+
var USAGE_QUERY_LIST_FILTERS = [
|
|
699
|
+
"userIds",
|
|
700
|
+
"apiKeyIds",
|
|
701
|
+
"providerIds",
|
|
702
|
+
"channelIds",
|
|
703
|
+
"modelIds",
|
|
704
|
+
"operations",
|
|
705
|
+
"requestStatuses",
|
|
706
|
+
"usageSources",
|
|
707
|
+
"normalizationStatuses",
|
|
708
|
+
"ratingStatuses"
|
|
709
|
+
];
|
|
710
|
+
var USAGE_QUERY_PARAMETERS = [
|
|
711
|
+
"start",
|
|
712
|
+
"end",
|
|
713
|
+
"timeZoneOffsetMinutes",
|
|
714
|
+
"groupBy",
|
|
715
|
+
"limit",
|
|
716
|
+
"cursor",
|
|
717
|
+
...USAGE_QUERY_LIST_FILTERS,
|
|
718
|
+
"upstreamModelId",
|
|
719
|
+
"breakdown"
|
|
720
|
+
];
|
|
721
|
+
|
|
697
722
|
// ../contracts/src/admin-errors.ts
|
|
698
723
|
var CALL_ERROR_STATUSES = ["failed", "rejected", "delivery_failed"];
|
|
699
724
|
var CALL_ANOMALY_STATUSES = [...CALL_ERROR_STATUSES, "cancelled"];
|