zuplo 7.1.6 → 7.1.8

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.
@@ -159,10 +159,10 @@ connecting a Git repository to making your first LLM request through Zuplo.
159
159
  :::note
160
160
 
161
161
  The gateway checks the key only after you add the
162
- [authentication policy](./policy-chains.mdx#authentication) to the route or
163
- to the app's chain. Until then the gateway identifies the app from the
164
- `{app_id}` segment of the URL and accepts the request without a key. The
165
- examples below send the key so they keep working once you add the policy.
162
+ [authentication policy](./policy-chains.mdx#authentication) to the app's
163
+ chain. Until then the gateway identifies the app from the `{app_id}` segment
164
+ of the URL and accepts the request without a key. The examples below send the
165
+ key so they keep working once you add the policy.
166
166
 
167
167
  :::
168
168
 
@@ -12,10 +12,9 @@ calling app from the key. A missing or invalid key returns `401`. A valid key
12
12
  whose app doesn't match the `{app_id}` in the URL returns `403`.
13
13
 
14
14
  The policy applies per app: in an app's chain, it requires a key for that app
15
- alone. A new team's [policy template](../policy-templates.mdx) includes it as a
16
- locked entry, so apps created in the team require keys from the start. Placed on
17
- the gateway's route instead—before the Configuration Executor, in the gateway's
18
- repository—one entry requires a key for every app on that route.
15
+ alone. A new top-level team's [policy template](../policy-templates.mdx)
16
+ includes it as a locked entry—and sub-teams inherit that template by default—so
17
+ apps created in the team require keys from the start.
19
18
 
20
19
  ## Options
21
20
 
@@ -33,11 +32,11 @@ expires.
33
32
 
34
33
  :::caution{title="A gateway without this policy is open"}
35
34
 
36
- When the policy sits neither on the route nor in an app's chain, the gateway
37
- resolves the app from the `{app_id}` segment of the URL and serves the request
38
- with no key at all. Anyone who knows the URL can spend against the app's
39
- providers and budget. Only run an open gateway when something else, such as
40
- network isolation, controls who can reach it.
35
+ When an app's chain doesn't include the policy, the gateway resolves the app
36
+ from the `{app_id}` segment of the URL and serves the request with no key at
37
+ all. Anyone who knows the URL can spend against the app's providers and budget.
38
+ Only run an open gateway when something else, such as network isolation,
39
+ controls who can reach it.
41
40
 
42
41
  :::
43
42
 
@@ -21,8 +21,8 @@ and secrets are inherited.
21
21
  | [Galileo tracing](./galileo-tracing.mdx) | Sends a trace of each request and response to Galileo |
22
22
  | [Configuration Executor](../policy-chains.mdx#configuration-executor) | Loads the app's configuration and runs its chain—this is what makes app chains work |
23
23
 
24
- The Configuration Executor sits on the gateway's route rather than in an app's
25
- chain. API key authentication works in either spot: in an app's chain it
26
- protects that app alone, and on the route it covers every app. Any
24
+ The Configuration Executor and its companion Configuration Loader sit on the
25
+ gateway's route rather than in an app's chain. API key authentication runs in an
26
+ app's chain and protects that app alone. Any
27
27
  [custom policy](../custom-policies.mdx) you declare joins the menu alongside
28
28
  these.
@@ -67,16 +67,14 @@ remove that entry.
67
67
  policy that's no longer declared.
68
68
  - An app with an empty chain runs no app-selected policies; requests go straight
69
69
  to the AI Gateway handler.
70
- - The chain is inbound-only. An app can't select an outbound policy, and the
71
- gateway rejects a chain entry whose declaration is outbound-only. Policies
72
- that need the response—Semantic Cache and the Akamai AI Firewall—register a
73
- response hook from their inbound position, so one entry covers both
74
- directions.
70
+ - The chain runs on the request path. Policies that need the response—Semantic
71
+ Cache and the Akamai AI Firewall—register a response hook from their position
72
+ in the chain, so one entry covers both directions.
75
73
  - There's no allow-list of policy types. Any policy declared in `policies.json`
76
- that works as an inbound policy is a valid chain entry, including a
74
+ is a valid chain entry, including a
77
75
  [custom code policy](./custom-policies.mdx). The only exclusions are the
78
- [Configuration Executor](#configuration-executor) itself and outbound-only
79
- policies.
76
+ [Configuration Executor](#configuration-executor) and its companion
77
+ Configuration Loader.
80
78
  - Chain validation is all-or-nothing: if any entry is invalid—for example, it
81
79
  references a policy that isn't declared in the gateway's `policies.json`—the
82
80
  request fails with an error identifying the entry to fix, and no entries run.
@@ -130,24 +128,26 @@ stored inbound chain, instantiating only policies already declared in
130
128
  `config/policies.json`. Every scaffolded gateway declares it and puts it on the
131
129
  AI Gateway route—that route entry is what gives an app's chain somewhere to run.
132
130
 
133
- Keep it on the **route**, not in an app's chain: it refuses to run itself
134
- recursively.
131
+ The scaffolded route also carries a **Configuration Loader**
132
+ (`ai-gateway-configuration-loader-v2-inbound`) ahead of the executor. The
133
+ executor loads the app's configuration by default, so the loader changes nothing
134
+ on its own—it's there for when you want to manipulate the loaded configuration
135
+ programmatically before the chain runs: place your own route policy between the
136
+ loader and the executor.
135
137
 
136
- Its only option is `cacheTtlSeconds`, which sets how long the gateway caches a
137
- loaded app configuration. The default is `10` seconds, `10` is also the minimum,
138
- and a lower value throws a configuration error—as does any other option key. The
139
- cache is skipped when the [authentication policy](#authentication) already
140
- loaded the configuration for the request.
138
+ Both take a single option, `cacheTtlSeconds`, which sets how long the gateway
139
+ caches a loaded app configuration. The default is `10` seconds, `10` is also the
140
+ minimum, and a lower value throws a configuration error—as does any other option
141
+ key.
141
142
 
142
143
  ## Authentication
143
144
 
144
145
  The `ai-gateway-auth-v2-inbound` policy—**API Key Authentication** in the
145
146
  portal—requires callers to present the app's API key, and it applies per app:
146
- add it to an app's chain to require a key for that app alone. A new team's
147
- [policy template](./policy-templates.mdx) includes it as a locked entry, so apps
148
- created in the team require keys from the start. To require keys for every app
149
- on a route regardless of what each app's chain selects, put the policy on the
150
- route in the gateway's repository, before the Configuration Executor.
147
+ add it to an app's chain to require a key for that app alone. A new top-level
148
+ team's [policy template](./policy-templates.mdx) includes it as a locked
149
+ entry—and sub-teams inherit that template by default—so apps created in the team
150
+ require keys from the start.
151
151
 
152
152
  Where the policy applies, clients send the app's API key as a bearer token and
153
153
  the gateway resolves the calling app from the key; for a missing or invalid key
@@ -160,11 +160,11 @@ working until the cache expires. Each app's key appears on its app page—see
160
160
 
161
161
  :::caution{title="A gateway without the authentication policy is open"}
162
162
 
163
- When the policy sits neither on the route nor in the app's chain, the gateway
164
- resolves the app from the `{app_id}` segment of the request URL and serves the
165
- request with no key of any kind. Anyone who knows the URL can spend against the
166
- app's providers and budget. Only run an open gateway when something else, such
167
- as network isolation, controls who can reach it.
163
+ When an app's chain doesn't include the policy, the gateway resolves the app
164
+ from the `{app_id}` segment of the request URL and serves the request with no
165
+ key of any kind. Anyone who knows the URL can spend against the app's providers
166
+ and budget. Only run an open gateway when something else, such as network
167
+ isolation, controls who can reach it.
168
168
 
169
169
  :::
170
170
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zuplo",
3
- "version": "7.1.6",
3
+ "version": "7.1.8",
4
4
  "type": "module",
5
5
  "description": "The programmable API Gateway",
6
6
  "author": "Zuplo, Inc.",
@@ -19,9 +19,9 @@
19
19
  "zuplo": "zuplo.js"
20
20
  },
21
21
  "dependencies": {
22
- "@zuplo/cli": "7.1.6",
23
- "@zuplo/core": "7.1.6",
24
- "@zuplo/runtime": "7.1.6",
25
- "@zuplo/test": "7.1.6"
22
+ "@zuplo/cli": "7.1.8",
23
+ "@zuplo/core": "7.1.8",
24
+ "@zuplo/runtime": "7.1.8",
25
+ "@zuplo/test": "7.1.8"
26
26
  }
27
27
  }