omnigateway 0.10.2 → 0.10.3

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.
Files changed (3) hide show
  1. package/bin/omni.js +15 -3
  2. package/gateway.js +15 -3
  3. package/package.json +1 -1
package/bin/omni.js CHANGED
@@ -26505,6 +26505,17 @@ function closingTurn(contents, note2) {
26505
26505
  }
26506
26506
  var hasCacheControl = (block) => ("cacheControl" in block) && block.cacheControl !== undefined;
26507
26507
  var PRUNED = "antigravity:tool-schema-pruned";
26508
+ var AGENT_PREAMBLE_DROPPED = "antigravity:agent-preamble-dropped";
26509
+ function dropAgentPreamble(system, note2) {
26510
+ const paragraphs = system.split(/(?:\r?\n){2,}/);
26511
+ const kept = paragraphs.filter((p) => p.trim() !== AGENT_PREAMBLE);
26512
+ if (kept.length === paragraphs.length)
26513
+ return system;
26514
+ note2(AGENT_PREAMBLE_DROPPED);
26515
+ return kept.join(`
26516
+
26517
+ `);
26518
+ }
26508
26519
  var MAX_STOP_SEQUENCES = 5;
26509
26520
  var MAX_THINKING_BUDGET = 65535;
26510
26521
  function scalarValue(kind, value) {
@@ -26797,8 +26808,9 @@ function toAntigravityWire(req, model, identity) {
26797
26808
  const request2 = {
26798
26809
  contents: closingTurn(openingTurn(mergeSameRole(contents), note2), note2)
26799
26810
  };
26800
- const system = systemText(req.system, "antigravity", note2);
26801
- if (system !== undefined && system.length > 0) {
26811
+ const joined = systemText(req.system, "antigravity", note2);
26812
+ const system = joined === undefined ? undefined : dropAgentPreamble(joined, note2);
26813
+ if (system !== undefined && system.trim().length > 0) {
26802
26814
  request2.systemInstruction = { parts: [{ text: system }] };
26803
26815
  }
26804
26816
  const generationConfig = {};
@@ -35743,7 +35755,7 @@ function createServiceDeps(input2) {
35743
35755
  }
35744
35756
 
35745
35757
  // apps/cli/src/version.ts
35746
- var VERSION = "0.10.2";
35758
+ var VERSION = "0.10.3";
35747
35759
 
35748
35760
  // apps/cli/src/commands/service.ts
35749
35761
  function gatewayArgv(root) {
package/gateway.js CHANGED
@@ -32072,6 +32072,17 @@ function closingTurn(contents, note) {
32072
32072
  }
32073
32073
  var hasCacheControl = (block) => ("cacheControl" in block) && block.cacheControl !== undefined;
32074
32074
  var PRUNED = "antigravity:tool-schema-pruned";
32075
+ var AGENT_PREAMBLE_DROPPED = "antigravity:agent-preamble-dropped";
32076
+ function dropAgentPreamble(system, note) {
32077
+ const paragraphs = system.split(/(?:\r?\n){2,}/);
32078
+ const kept = paragraphs.filter((p) => p.trim() !== AGENT_PREAMBLE);
32079
+ if (kept.length === paragraphs.length)
32080
+ return system;
32081
+ note(AGENT_PREAMBLE_DROPPED);
32082
+ return kept.join(`
32083
+
32084
+ `);
32085
+ }
32075
32086
  var MAX_STOP_SEQUENCES = 5;
32076
32087
  var MAX_THINKING_BUDGET = 65535;
32077
32088
  function scalarValue(kind, value) {
@@ -32364,8 +32375,9 @@ function toAntigravityWire(req, model, identity) {
32364
32375
  const request2 = {
32365
32376
  contents: closingTurn(openingTurn(mergeSameRole(contents), note), note)
32366
32377
  };
32367
- const system = systemText(req.system, "antigravity", note);
32368
- if (system !== undefined && system.length > 0) {
32378
+ const joined = systemText(req.system, "antigravity", note);
32379
+ const system = joined === undefined ? undefined : dropAgentPreamble(joined, note);
32380
+ if (system !== undefined && system.trim().length > 0) {
32369
32381
  request2.systemInstruction = { parts: [{ text: system }] };
32370
32382
  }
32371
32383
  const generationConfig = {};
@@ -60648,7 +60660,7 @@ function createRing(limits) {
60648
60660
  }
60649
60661
 
60650
60662
  // apps/gateway/src/version.ts
60651
- var VERSION = "0.10.2";
60663
+ var VERSION = "0.10.3";
60652
60664
 
60653
60665
  // apps/gateway/src/app.ts
60654
60666
  var ADMIN_SESSION_TTL_MS = 12 * 60 * 60 * 1000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnigateway",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "description": "Self-hosted AI gateway with Anthropic- and OpenAI-compatible APIs, an admin console, and a CLI",
5
5
  "license": "MIT",
6
6
  "author": "Harismawan <mail@harismawan.com>",