From b824cf0a20b2177e238b7e3f36bc0d3a5af3d833 Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Mon, 18 Nov 2024 17:15:13 +0000 Subject: [PATCH 1/9] headers glossary initial documentation --- src/content/docs/ai-gateway/glossary.mdx | 10 +++++ src/content/glossary/ai-gateway.yaml | 51 ++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 src/content/docs/ai-gateway/glossary.mdx create mode 100644 src/content/glossary/ai-gateway.yaml diff --git a/src/content/docs/ai-gateway/glossary.mdx b/src/content/docs/ai-gateway/glossary.mdx new file mode 100644 index 000000000000000..58b03e1a5b3ec55 --- /dev/null +++ b/src/content/docs/ai-gateway/glossary.mdx @@ -0,0 +1,10 @@ +--- +title: Glossary +pcx_content_type: glossary +--- + +import { Glossary } from "~/components"; + +Review the definitions for headers used across Cloudflare's AI Gateway documentation. + + diff --git a/src/content/glossary/ai-gateway.yaml b/src/content/glossary/ai-gateway.yaml new file mode 100644 index 000000000000000..68028df1299897f --- /dev/null +++ b/src/content/glossary/ai-gateway.yaml @@ -0,0 +1,51 @@ +--- +productName: AI Gateway +entries: + - term: cf-aig-event-id + general_definition: |- + Unique identifier for an AI Gateway event, used to trace specific events through the system. + + - term: cf-aig-step + general_definition: |- + Identifies the processing step in the AI Gateway flow for better tracking and debugging. + + - term: cf-aig-log-id + general_definition: |- + Identifier for logging specific to the AI Gateway, enabling detailed tracking of requests. + + - term: cf-aig-collect-log + general_definition: |- + Specifies if logging data should be collected for a particular request in the AI Gateway. + + - term: cf-aig-custom-cost + general_definition: |- + Allows the customization of request cost within AI Gateway to reflect user-defined parameters. + + - term: cf-aig-cache-key + general_definition: |- + Custom key to determine cache storage and retrieval in the AI Gateway. + + - term: cf-aig-cache-status + general_definition: |- + Status indicator for AI Gateway caching, showing if a request was served from cache. + + - term: cf-aig-metadata + general_definition: |- + Additional metadata associated with a request in the AI Gateway. + + - term: cf-aig-cache-ttl + general_definition: |- + Specifies the cache time-to-live for AI Gateway responses. + + - term: cf-aig-skip-cache + general_definition: |- + Header to bypass caching for a specific request in the AI Gateway. + + # Deprecated headers + - term: cf-cache-ttl + general_definition: |- + Deprecated: This header is replaced by `cf-aig-cache-ttl` in AI Gateway. It specifies cache time-to-live. + + - term: cf-skip-cache + general_definition: |- + Deprecated: This header is replaced by `cf-aig-skip-cache` in AI Gateway. It bypasses caching for a specific request. From 77423c088486422ebde98143830e1306c1af73e1 Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Wed, 20 Nov 2024 17:57:25 +0000 Subject: [PATCH 2/9] minor changes --- src/content/docs/ai-gateway/glossary.mdx | 2 +- src/content/glossary/ai-gateway.yaml | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/content/docs/ai-gateway/glossary.mdx b/src/content/docs/ai-gateway/glossary.mdx index 58b03e1a5b3ec55..badc03397292130 100644 --- a/src/content/docs/ai-gateway/glossary.mdx +++ b/src/content/docs/ai-gateway/glossary.mdx @@ -5,6 +5,6 @@ pcx_content_type: glossary import { Glossary } from "~/components"; -Review the definitions for headers used across Cloudflare's AI Gateway documentation. +I Gateway supports a variety of headers to help you configure, customize, and manage your API requests. This page provides a complete list of all supported headers, along with a short description diff --git a/src/content/glossary/ai-gateway.yaml b/src/content/glossary/ai-gateway.yaml index 68028df1299897f..90ad438370ae7b8 100644 --- a/src/content/glossary/ai-gateway.yaml +++ b/src/content/glossary/ai-gateway.yaml @@ -3,7 +3,7 @@ productName: AI Gateway entries: - term: cf-aig-event-id general_definition: |- - Unique identifier for an AI Gateway event, used to trace specific events through the system. + Unique identifier for an event, used to trace specific events through the system. - term: cf-aig-step general_definition: |- @@ -11,41 +11,41 @@ entries: - term: cf-aig-log-id general_definition: |- - Identifier for logging specific to the AI Gateway, enabling detailed tracking of requests. + Identifier for logging, enabling detailed tracking of requests. - term: cf-aig-collect-log general_definition: |- - Specifies if logging data should be collected for a particular request in the AI Gateway. + Specifies if logging data should be collected for a particular request. - term: cf-aig-custom-cost general_definition: |- - Allows the customization of request cost within AI Gateway to reflect user-defined parameters. + Allows the customization of request cost to reflect user-defined parameters. - term: cf-aig-cache-key general_definition: |- - Custom key to determine cache storage and retrieval in the AI Gateway. + Custom key to determine cache storage and retrieval. - term: cf-aig-cache-status general_definition: |- - Status indicator for AI Gateway caching, showing if a request was served from cache. + Status indicator for caching, showing if a request was served from cache. - term: cf-aig-metadata general_definition: |- - Additional metadata associated with a request in the AI Gateway. + Additional metadata associated with a request. - term: cf-aig-cache-ttl general_definition: |- - Specifies the cache time-to-live for AI Gateway responses. + Specifies the cache time-to-live for responses. - term: cf-aig-skip-cache general_definition: |- - Header to bypass caching for a specific request in the AI Gateway. + Header to bypass caching for a specific request. # Deprecated headers - term: cf-cache-ttl general_definition: |- - Deprecated: This header is replaced by `cf-aig-cache-ttl` in AI Gateway. It specifies cache time-to-live. + Deprecated: This header is replaced by `cf-aig-cache-ttl`. It specifies cache time-to-live. - term: cf-skip-cache general_definition: |- - Deprecated: This header is replaced by `cf-aig-skip-cache` in AI Gateway. It bypasses caching for a specific request. + Deprecated: This header is replaced by `cf-aig-skip-cache`. It bypasses caching for a specific request. From 5616bf10deee50097691d4ec42c7a15ce2200381 Mon Sep 17 00:00:00 2001 From: Kathy <153706637+kathayl@users.noreply.github.com> Date: Wed, 20 Nov 2024 15:21:32 -0800 Subject: [PATCH 3/9] Update glossary.mdx --- src/content/docs/ai-gateway/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/ai-gateway/glossary.mdx b/src/content/docs/ai-gateway/glossary.mdx index badc03397292130..56b5a0a96b94d17 100644 --- a/src/content/docs/ai-gateway/glossary.mdx +++ b/src/content/docs/ai-gateway/glossary.mdx @@ -5,6 +5,6 @@ pcx_content_type: glossary import { Glossary } from "~/components"; -I Gateway supports a variety of headers to help you configure, customize, and manage your API requests. This page provides a complete list of all supported headers, along with a short description +AI Gateway supports a variety of headers to help you configure, customize, and manage your API requests. This page provides a complete list of all supported headers, along with a short description From 029d7b59010058d3327bd7cf223f9ade440de0ee Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Fri, 22 Nov 2024 13:33:23 +0000 Subject: [PATCH 4/9] added links --- src/content/glossary/ai-gateway.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/glossary/ai-gateway.yaml b/src/content/glossary/ai-gateway.yaml index 90ad438370ae7b8..f50e0ca41690be6 100644 --- a/src/content/glossary/ai-gateway.yaml +++ b/src/content/glossary/ai-gateway.yaml @@ -3,7 +3,7 @@ productName: AI Gateway entries: - term: cf-aig-event-id general_definition: |- - Unique identifier for an event, used to trace specific events through the system. + [cf-aig-event-id](/ai-gateway/evaluations/add-human-feedback-api/#3-retrieve-the-cf-aig-log-id)Unique identifier for an event, used to trace specific events through the system. - term: cf-aig-step general_definition: |- From aa9f525170b0eb0c28fae5a1572e9edb3fe92293 Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Fri, 22 Nov 2024 16:42:18 +0000 Subject: [PATCH 5/9] added links --- src/content/glossary/ai-gateway.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/content/glossary/ai-gateway.yaml b/src/content/glossary/ai-gateway.yaml index f50e0ca41690be6..c52982d0e380855 100644 --- a/src/content/glossary/ai-gateway.yaml +++ b/src/content/glossary/ai-gateway.yaml @@ -4,6 +4,7 @@ entries: - term: cf-aig-event-id general_definition: |- [cf-aig-event-id](/ai-gateway/evaluations/add-human-feedback-api/#3-retrieve-the-cf-aig-log-id)Unique identifier for an event, used to trace specific events through the system. + link: /ai-gateway/evaluations/add-human-feedback-api/#3-retrieve-the-cf-aig-log-id - term: cf-aig-step general_definition: |- From 85cd87846d23ce0bfcbf8543e73b3477c34f7ad6 Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Fri, 22 Nov 2024 17:21:03 +0000 Subject: [PATCH 6/9] added header hierachy docs --- src/content/docs/ai-gateway/glossary.mdx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/content/docs/ai-gateway/glossary.mdx b/src/content/docs/ai-gateway/glossary.mdx index 56b5a0a96b94d17..9eb19eaea446711 100644 --- a/src/content/docs/ai-gateway/glossary.mdx +++ b/src/content/docs/ai-gateway/glossary.mdx @@ -5,6 +5,21 @@ pcx_content_type: glossary import { Glossary } from "~/components"; +# Configuration Hierarchy in AI Gateway + +Settings in AI Gateway can be configured at three levels: **Provider**, **Request**, and **Gateway**. Since the same settings can be configured in multiple locations, the following hierarchy determines which value is applied: + +1. **Provider-level headers**: + Relevant only when using the [Universal Endpoint](/ai-gateway/providers/universal/), these headers take precedence over all other configurations. + +2. **Request-level headers**: + Apply if no provider-level headers are set. + +3. **Gateway-level settings**: + Act as the default if no headers are set at the provider or request levels. + +This hierarchy ensures consistent behavior, prioritizing the most specific configurations. Use provider-level and request-level headers for more fine-tuned control, and gateway settings for general defaults. + AI Gateway supports a variety of headers to help you configure, customize, and manage your API requests. This page provides a complete list of all supported headers, along with a short description From 4e5934ffd19c6f5504327dfe0a1d360beae81aac Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Fri, 22 Nov 2024 17:21:43 +0000 Subject: [PATCH 7/9] spelling --- src/content/docs/ai-gateway/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/ai-gateway/glossary.mdx b/src/content/docs/ai-gateway/glossary.mdx index 9eb19eaea446711..52818dc9e1a7703 100644 --- a/src/content/docs/ai-gateway/glossary.mdx +++ b/src/content/docs/ai-gateway/glossary.mdx @@ -5,7 +5,7 @@ pcx_content_type: glossary import { Glossary } from "~/components"; -# Configuration Hierarchy in AI Gateway +# Configuration hierarchy Settings in AI Gateway can be configured at three levels: **Provider**, **Request**, and **Gateway**. Since the same settings can be configured in multiple locations, the following hierarchy determines which value is applied: From a438e8640fae62dcc105e503ec1b3ed136d6ae2d Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Fri, 22 Nov 2024 17:48:40 +0000 Subject: [PATCH 8/9] added links --- src/content/glossary/ai-gateway.yaml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/content/glossary/ai-gateway.yaml b/src/content/glossary/ai-gateway.yaml index c52982d0e380855..4452395050cf9b9 100644 --- a/src/content/glossary/ai-gateway.yaml +++ b/src/content/glossary/ai-gateway.yaml @@ -3,44 +3,43 @@ productName: AI Gateway entries: - term: cf-aig-event-id general_definition: |- - [cf-aig-event-id](/ai-gateway/evaluations/add-human-feedback-api/#3-retrieve-the-cf-aig-log-id)Unique identifier for an event, used to trace specific events through the system. - link: /ai-gateway/evaluations/add-human-feedback-api/#3-retrieve-the-cf-aig-log-id + [cf-aig-event-id](/ai-gateway/evaluations/add-human-feedback-api/#3-retrieve-the-cf-aig-log-id) is a unique identifier for an event, used to trace specific events through the system. - term: cf-aig-step general_definition: |- - Identifies the processing step in the AI Gateway flow for better tracking and debugging. + [cf-aig-step](/ai-gateway/configuration/fallbacks/#response-headercf-aig-step) identifies the processing step in the AI Gateway flow for better tracking and debugging. - term: cf-aig-log-id general_definition: |- - Identifier for logging, enabling detailed tracking of requests. + The [cf-aig-log-id](/ai-gateway/evaluations/add-human-feedback-api/#3-retrieve-the-cf-aig-log-id) is a unique identifier for the specific log entry to which you want to add feedback. - term: cf-aig-collect-log general_definition: |- - Specifies if logging data should be collected for a particular request. + The [cf-aig-collect-log](/ai-gateway/observability/logging/#collect-logs-cf-aig-collect-log) header allows you to bypass the default log setting for the gateway. - term: cf-aig-custom-cost general_definition: |- - Allows the customization of request cost to reflect user-defined parameters. + Allows the [customization of request cost](/ai-gateway/configuration/custom-costs/#custom-cost) to reflect user-defined parameters. - term: cf-aig-cache-key general_definition: |- - Custom key to determine cache storage and retrieval. + The [cf-aig-cache-key-aig-cache-key](/ai-gateway/configuration/caching/#custom-cache-key-cf-aig-cache-key) let you override the default cache key in order to precisely set the cacheability setting for any resource. - term: cf-aig-cache-status general_definition: |- - Status indicator for caching, showing if a request was served from cache. + [Status indicator for caching](/ai-gateway/configuration/caching/#default-configuration), showing if a request was served from cache. - term: cf-aig-metadata general_definition: |- - Additional metadata associated with a request. + [Custom metadata](/ai-gateway/configuration/custom-metadata/)allows you to tag requests with user IDs or other identifiers, enabling better tracking and analysis of your requests. - term: cf-aig-cache-ttl general_definition: |- - Specifies the cache time-to-live for responses. + Specifies the [cache time-to-live for responses](/ai-gateway/configuration/caching/#cache-ttl-cf-aig-cache-ttl). - term: cf-aig-skip-cache general_definition: |- - Header to bypass caching for a specific request. + Header to [bypass caching for a specific request](/ai-gateway/configuration/caching/#skip-cache-cf-aig-skip-cache). # Deprecated headers - term: cf-cache-ttl From a428eee9db505815dc78f37b2aac19067af404ec Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Fri, 22 Nov 2024 18:59:10 +0000 Subject: [PATCH 9/9] Moved hierarchy info --- src/content/docs/ai-gateway/glossary.mdx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/content/docs/ai-gateway/glossary.mdx b/src/content/docs/ai-gateway/glossary.mdx index 52818dc9e1a7703..28f7674f83dab0d 100644 --- a/src/content/docs/ai-gateway/glossary.mdx +++ b/src/content/docs/ai-gateway/glossary.mdx @@ -5,21 +5,19 @@ pcx_content_type: glossary import { Glossary } from "~/components"; -# Configuration hierarchy +AI Gateway supports a variety of headers to help you configure, customize, and manage your API requests. This page provides a complete list of all supported headers, along with a short description + + + +## Configuration hierarchy Settings in AI Gateway can be configured at three levels: **Provider**, **Request**, and **Gateway**. Since the same settings can be configured in multiple locations, the following hierarchy determines which value is applied: 1. **Provider-level headers**: Relevant only when using the [Universal Endpoint](/ai-gateway/providers/universal/), these headers take precedence over all other configurations. - 2. **Request-level headers**: Apply if no provider-level headers are set. - 3. **Gateway-level settings**: Act as the default if no headers are set at the provider or request levels. This hierarchy ensures consistent behavior, prioritizing the most specific configurations. Use provider-level and request-level headers for more fine-tuned control, and gateway settings for general defaults. - -AI Gateway supports a variety of headers to help you configure, customize, and manage your API requests. This page provides a complete list of all supported headers, along with a short description - -