MCPcopy Create free account
hub / github.com/Writesonic/GPTRouter / ModelHealthCheck

Class ModelHealthCheck

src/models/ModelHealthCheck.ts:10–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8 */
9@Entity()
10export class ModelHealthCheck extends BaseEntity {
11 @PrimaryGeneratedColumn("uuid")
12 id: string;
13
14 @ManyToOne(() => Model, model => model.healthChecks)
15 @JoinColumn({ name: "modelId" })
16 model: Model;
17
18 @Column({ name: "modelId", nullable: false })
19 modelId: string;
20
21 @ManyToOne(() => Provider, provider => provider.healthChecks)
22 @JoinColumn({ name: "providerId" })
23 provider: Provider;
24
25 @Column({ name: "providerId", nullable: false })
26 providerId: string;
27
28 @Column()
29 status: string;
30
31 @Column({ name: "isAvailable", default: false, nullable: false })
32 isAvailable: boolean;
33
34 @Column({ type: "float", name: "latency", nullable: true })
35 latency: number;
36
37 @CreateDateColumn({ name: "lastChecked" })
38 lastChecked: Date;
39}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected