File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { createLoggingMiddleware } from './logging';
55import { GatewayProxy } from './gateway' ;
66import { JwtVerifier } from './jwt' ;
77import { ModelCatalog } from './models' ;
8- import { CodexCatalog } from './codex' ;
98import { icLogoFaviconSvg , landingPage } from './landing' ;
109
1110type Bindings = {
@@ -41,8 +40,6 @@ app.get('/.well-known/opencode', async (c) => {
4140 return c . json ( buildDiscoveryPayload ( origin , modelsByGateway ) ) ;
4241} ) ;
4342
44- app . get ( '/.well-known/codex' , ( c ) => c . json ( new CodexCatalog ( ) . payload ( ) ) ) ;
45-
4643app . use ( '/v1/*' , async ( c , next ) => {
4744 const provider = c . req . path . split ( '/' ) [ 2 ] ;
4845 if ( ! provider || ! isGatewayProvider ( provider ) ) return c . json ( { error : 'Unknown provider' } , 404 ) ;
Original file line number Diff line number Diff line change @@ -98,22 +98,6 @@ describe('integration', () => {
9898 expect ( response . status ) . toBe ( 404 ) ;
9999 } ) ;
100100
101- it ( 'returns codex rules without authentication' , async ( ) => {
102- const response = await SELF . fetch ( 'https://opencode.icap.dev/.well-known/codex' ) ;
103- expect ( response . status ) . toBe ( 200 ) ;
104-
105- const body = ( await response . json ( ) ) as {
106- version : number ;
107- count : number ;
108- rules : Array < { id : string ; title : string ; category : string ; severity : string ; rationale : string } > ;
109- } ;
110- expect ( body . version ) . toBe ( 1 ) ;
111- expect ( body . count ) . toBe ( body . rules . length ) ;
112- expect ( body . rules . length ) . toBeGreaterThan ( 0 ) ;
113- expect ( body . rules . every ( ( r ) => / ^ I C - [ A - Z ] + - \d { 3 } $ / . test ( r . id ) ) ) . toBe ( true ) ;
114- expect ( body . rules . some ( ( r ) => r . id === 'IC-TEST-009' && r . title === 'Avoid mocks' ) ) . toBe ( true ) ;
115- } ) ;
116-
117101 it ( 'returns 404 for unknown providers without requiring authentication' , async ( ) => {
118102 const response = await SELF . fetch ( 'https://opencode.icap.dev/v1/groq/v1/messages' , {
119103 method : 'POST' ,
You can’t perform that action at this time.
0 commit comments