Files
moloapp/src/vendors/bedrock/caps.h
T

43 lines
2.0 KiB
C++

#pragma once
// Static ceilings for the Bedrock module. Never autotuned. Numbers marked
// (spec) come from the AWS service models (see SPEC.md ## Sources), the rest
// are our own hard caps.
#include <cstddef>
namespace molo::bedrock {
struct BedrockCaps {
static constexpr std::size_t kMaxInvokeBodyBytes = 25000000; // (spec) blob max
static constexpr std::size_t kMaxResponseBytes = 64u * 1024u * 1024u;
static constexpr std::size_t kMaxStreamBytes = 64u * 1024u * 1024u;
// Event stream framing: AWS documents 16 MiB per message and 128 KiB of headers.
static constexpr std::size_t kMaxEventMessageBytes = 16u * 1024u * 1024u;
static constexpr std::size_t kMaxEventHeaderBytes = 128u * 1024u;
static constexpr std::size_t kMaxStreamEvents = 200000;
static constexpr std::size_t kMaxModelIdChars = 2048; // (spec)
static constexpr std::size_t kMaxRegionChars = 32;
static constexpr std::size_t kMaxMessages = 4096;
static constexpr std::size_t kMaxTools = 128;
static constexpr std::size_t kMaxStopSequences = 2500; // (spec)
static constexpr std::size_t kMaxContentBlocks = 512;
static constexpr std::size_t kMaxSystemBlocks = 64;
static constexpr std::size_t kMaxSignedHeaders = 64;
static constexpr std::size_t kMaxQueryParams = 64;
static constexpr std::size_t kMaxPathChars = 4096;
static constexpr int kMaxResults = 1000; // (spec) list calls
static constexpr std::size_t kMaxPages = 20; // list walks
static constexpr std::size_t kMaxItemsReturned = 5000;
static constexpr int kMaxRetrieveResults = 100; // (spec)
static constexpr std::size_t kMaxRetrieveQueryChars = 20000; // (spec)
static constexpr std::size_t kMaxAgentInputChars = 25000000; // (spec)
static constexpr std::size_t kMaxGuardrailBlocks = 64;
static constexpr std::size_t kMaxGuardrailTextChars = 1000000;
static constexpr int kMinBatchTimeoutHours = 24; // (spec)
static constexpr int kMaxBatchTimeoutHours = 168; // (spec)
static constexpr std::size_t kMaxJobNameChars = 63; // (spec)
};
} // namespace molo::bedrock