feat: publish sanitized custom.97 source
This commit is contained in:
1022 files changed
+69903
-19207
No files matched your search
@@ -23,6 +23,12 @@ type Options struct {
|
||||
// it from the channel type.
|
||||
OpenRouterDialect bool
|
||||
|
||||
// WebSearch encodes hosted web search for the upstream dialect. Nil, or a
|
||||
// nil result, keeps the default: web_search_options on Chat and the native
|
||||
// hosted tool on Responses, Claude, and Gemini. The host sets it from the
|
||||
// channel adaptor's Init.
|
||||
WebSearch WebSearchEncoder
|
||||
|
||||
// PreserveThinkingSuffix reports models whose -thinking/-nothinking/effort
|
||||
// suffix must be kept on the outgoing model name (host blacklist lookup).
|
||||
// Nil means "never preserve".
|
||||
@@ -34,9 +40,13 @@ type Options struct {
|
||||
}
|
||||
|
||||
type ClaudeOptions struct {
|
||||
// ThinkingAdapterEnabled controls whether suffix-derived reasoning intent
|
||||
// is rendered onto Claude thinking / output_config. Suffix parsing itself
|
||||
// is the host entry layer's job (standalone users call Parse* themselves).
|
||||
// ThinkingAdapterEnabled is the host thinking-suffix adapter toggle. The
|
||||
// host passes it to reasoning.ParseClaudeModelSuffix, so -thinking,
|
||||
// -nothinking, -thinking-<budget>, and effort tails such as -high on
|
||||
// claude-* names become reasoning intent only while it is on; when off the
|
||||
// model name is sent verbatim. Explicit @ modifiers are unaffected. Suffix
|
||||
// parsing itself is the host entry layer's job (standalone users call
|
||||
// Parse* themselves).
|
||||
ThinkingAdapterEnabled bool
|
||||
// ThinkingAdapterBudgetTokensPercentage sizes thinking budget_tokens as a
|
||||
// fraction of max_tokens when the adapter fires.
|
||||
@@ -57,9 +67,12 @@ type ClaudeOptions struct {
|
||||
}
|
||||
|
||||
type GeminiOptions struct {
|
||||
// ThinkingAdapterEnabled controls whether suffix-derived reasoning intent
|
||||
// is rendered onto Gemini thinkingConfig. Suffix parsing itself is the
|
||||
// host entry layer's job (standalone users call Parse* themselves).
|
||||
// ThinkingAdapterEnabled is the host thinking-suffix adapter toggle. The
|
||||
// host and gemini_chat request conversion pass it to
|
||||
// reasoning.ParseGeminiModelSuffix, so -thinking, -nothinking,
|
||||
// -thinking-<budget>, and effort tails such as -high on gemini-* names
|
||||
// become reasoning intent only while it is on; when off the model name is
|
||||
// sent verbatim. Explicit @ modifiers are unaffected.
|
||||
ThinkingAdapterEnabled bool
|
||||
// ThinkingAdapterBudgetTokensPercentage sizes thinkingBudget as a fraction
|
||||
// of maxOutputTokens when the adapter fires.
|
||||
@@ -70,6 +83,12 @@ type GeminiOptions struct {
|
||||
// SupportsImagine reports whether the model supports image generation
|
||||
// (switches response modalities). Nil means "never".
|
||||
SupportsImagine func(modelName string) bool
|
||||
// SupportsJSONSchema reports whether the upstream accepts JSON Schema in
|
||||
// parametersJsonSchema and responseJsonSchema for the model. A schema that
|
||||
// Gemini's typed Schema cannot hold without loss is then sent there
|
||||
// unchanged; otherwise it is cleaned to the typed Schema and the loss is
|
||||
// reported as a diagnostic. Nil means "never".
|
||||
SupportsJSONSchema func(modelName string) bool
|
||||
// SafetySetting returns the harm threshold for a category. Nil or empty
|
||||
// return means no safetySettings are attached.
|
||||
SafetySetting func(category string) string
|
||||
@@ -86,6 +105,10 @@ func (o *GeminiOptions) SupportsImagineModel(modelName string) bool {
|
||||
return o != nil && o.SupportsImagine != nil && o.SupportsImagine(modelName)
|
||||
}
|
||||
|
||||
func (o *GeminiOptions) SupportsJSONSchemaModel(modelName string) bool {
|
||||
return o != nil && o.SupportsJSONSchema != nil && o.SupportsJSONSchema(modelName)
|
||||
}
|
||||
|
||||
func (o *GeminiOptions) SafetySettingFor(category string) string {
|
||||
if o == nil || o.SafetySetting == nil {
|
||||
return ""
|
||||
|
||||
Reference in new issue
Block a user