ids.ts 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import { Schema } from "effect"
  2. /** Stable string identifier for a protocol implementation. */
  3. export const ProtocolID = Schema.String
  4. export type ProtocolID = Schema.Schema.Type<typeof ProtocolID>
  5. /** Stable string identifier for the runnable route. */
  6. export const RouteID = Schema.String
  7. export type RouteID = Schema.Schema.Type<typeof RouteID>
  8. export const ModelID = Schema.String.pipe(Schema.brand("LLM.ModelID"))
  9. export type ModelID = typeof ModelID.Type
  10. export const ProviderID = Schema.String.pipe(Schema.brand("LLM.ProviderID"))
  11. export type ProviderID = typeof ProviderID.Type
  12. export const ResponseID = Schema.String
  13. export type ResponseID = Schema.Schema.Type<typeof ResponseID>
  14. export const ContentBlockID = Schema.String
  15. export type ContentBlockID = Schema.Schema.Type<typeof ContentBlockID>
  16. export const ToolCallID = Schema.String
  17. export type ToolCallID = Schema.Schema.Type<typeof ToolCallID>
  18. export const ReasoningEfforts = ["none", "minimal", "low", "medium", "high", "xhigh", "max"] as const
  19. export const ReasoningEffort = Schema.Literals(ReasoningEfforts)
  20. export type ReasoningEffort = Schema.Schema.Type<typeof ReasoningEffort>
  21. export const TextVerbosity = Schema.Literals(["low", "medium", "high"])
  22. export type TextVerbosity = Schema.Schema.Type<typeof TextVerbosity>
  23. export const MessageRole = Schema.Literals(["user", "assistant", "tool"])
  24. export type MessageRole = Schema.Schema.Type<typeof MessageRole>
  25. export const FinishReason = Schema.Literals(["stop", "length", "tool-calls", "content-filter", "error", "unknown"])
  26. export type FinishReason = Schema.Schema.Type<typeof FinishReason>
  27. export const JsonSchema = Schema.Record(Schema.String, Schema.Unknown)
  28. export type JsonSchema = Schema.Schema.Type<typeof JsonSchema>
  29. export const ProviderMetadata = Schema.Record(Schema.String, Schema.Record(Schema.String, Schema.Unknown))
  30. export type ProviderMetadata = Schema.Schema.Type<typeof ProviderMetadata>