File tree Expand file tree Collapse file tree 3 files changed +31
-3
lines changed
Expand file tree Collapse file tree 3 files changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,37 @@ import type {
1515} from '../templates/initial-agents-dir/types/agent-definition'
1616import type { Logger } from '../templates/initial-agents-dir/types/util-types'
1717import type { ToolName } from '../tools/constants'
18- import type { OpenRouterProviderOptions } from '@codebuff/internal/openrouter-ai-sdk'
1918import type { z } from 'zod/v4'
2019
2120export type AgentId = `${string } /${string } @${number } .${number } .${number } `
2221
22+ export type OpenRouterProviderOptions = {
23+ models ?: string [ ]
24+
25+ /**
26+ * https://openrouter.ai/docs/use-cases/reasoning-tokens
27+ * One of `max_tokens` or `effort` is required.
28+ * If `exclude` is true, reasoning will be removed from the response. Default is false.
29+ */
30+ reasoning ?: {
31+ enabled ?: boolean
32+ exclude ?: boolean
33+ } & (
34+ | {
35+ max_tokens : number
36+ }
37+ | {
38+ effort : 'high' | 'medium' | 'low'
39+ }
40+ )
41+
42+ /**
43+ * A unique identifier representing your end-user, which can
44+ * help OpenRouter to monitor and detect abuse.
45+ */
46+ user ?: string
47+ }
48+
2349/**
2450 * Backend agent template with strict validation and Zod schemas
2551 * Extends the user-facing AgentDefinition but with backend-specific requirements
Original file line number Diff line number Diff line change 1- import type { AgentTemplate } from '.. /agent-template'
2- import type { Logger } from '. /logger'
1+ import type { AgentTemplate } from '@codebuff/common/types /agent-template'
2+ import type { Logger } from '@codebuff/common/types/contracts /logger'
33
44type User = {
55 id : string
Original file line number Diff line number Diff line change @@ -25,3 +25,5 @@ export { ToolHelpers } from './tools'
2525export * from './websocket-client'
2626export { formatState } from '../../common/src/websockets/websocket-client'
2727export type { ReadyState } from '../../common/src/websockets/websocket-client'
28+
29+ export { getUserInfoFromApiKey } from './impl/database'
You can’t perform that action at this time.
0 commit comments