kimi-proxy 0.1.0 → 0.1.2

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.js CHANGED
@@ -3239,10 +3239,6 @@ class SignatureCache {
3239
3239
  }
3240
3240
 
3241
3241
  // src/core/providers/vertex.ts
3242
- var VERTEX_GLOBAL_MODELS = new Set([
3243
- "gemini-3-pro-preview",
3244
- "google/gemini-3-pro-preview"
3245
- ]);
3246
3242
  var MAAS_MODEL_PATTERN = /\/.*-maas$/i;
3247
3243
  function ulxContentToText2(blocks) {
3248
3244
  if (!blocks.length)
@@ -3732,8 +3728,8 @@ class VertexProviderAdapter {
3732
3728
  normalizeModelId(model) {
3733
3729
  if (!model)
3734
3730
  return;
3735
- if (VERTEX_GLOBAL_MODELS.has(model)) {
3736
- return "google/gemini-3-pro-preview";
3731
+ if (model.includes("gemini") && !model.includes("/")) {
3732
+ return `google/${model}`;
3737
3733
  }
3738
3734
  return model;
3739
3735
  }
@@ -3754,7 +3750,7 @@ class VertexProviderAdapter {
3754
3750
  return model;
3755
3751
  }
3756
3752
  resolveLocation(model, configured) {
3757
- if (model && VERTEX_GLOBAL_MODELS.has(model)) {
3753
+ if (model && (model.includes("google/") || model.includes("gemini"))) {
3758
3754
  return "global";
3759
3755
  }
3760
3756
  return configured;
@@ -4062,6 +4058,8 @@ class EnsureToolCallResponseTransform {
4062
4058
  }
4063
4059
  if (!hasContent && finalAnswer) {
4064
4060
  messageBlock.content = [{ type: "text", text: finalAnswer }];
4061
+ } else if (hasContent && finalAnswer) {
4062
+ messageBlock.content.push({ type: "text", text: finalAnswer });
4065
4063
  }
4066
4064
  continue;
4067
4065
  }
@@ -4193,7 +4191,7 @@ class ModelRegistry {
4193
4191
  }));
4194
4192
  }
4195
4193
  resolve(modelName, profile) {
4196
- let variants = this.groups.get(modelName);
4194
+ let variants = this.groups.get(modelName)?.filter((v) => !v.profile || v.profile === profile);
4197
4195
  if (variants && variants.length > 0 && profile) {
4198
4196
  const filtered = variants.filter((v) => v.profile === profile);
4199
4197
  if (filtered.length > 0) {
@@ -5927,5 +5925,5 @@ async function bootstrap() {
5927
5925
  }
5928
5926
  bootstrap();
5929
5927
 
5930
- //# debugId=F881C1C9CEFDCBCF64756E2164756E21
5928
+ //# debugId=C3410C5B307F3A9164756E2164756E21
5931
5929
  //# sourceMappingURL=index.js.map