@@ -31,6 +31,7 @@ describe('provider availability coverage', () => {
3131 delete process . env . CLOUDFLARE_ACCOUNT_ID ;
3232 delete process . env . CLOUDFLARE_API_TOKEN ;
3333 delete process . env . HUGGINGFACE_INFERENCE_API_TOKEN ;
34+ delete process . env . COHERE_API_KEY ;
3435 delete process . env . HUGGINGFACE_BASE_URL ;
3536 } ) ;
3637
@@ -41,6 +42,7 @@ describe('provider availability coverage', () => {
4142 process . env . CLOUDFLARE_ACCOUNT_ID = 'cf-acc' ;
4243 process . env . CLOUDFLARE_API_TOKEN = 'cf-key' ;
4344 process . env . HUGGINGFACE_INFERENCE_API_TOKEN = 'hf-key' ;
45+ process . env . COHERE_API_KEY = 'co-key' ;
4446
4547 const fetchMock = vi . fn ( async ( url ) => {
4648 const u = String ( url ) ;
@@ -65,6 +67,9 @@ describe('provider availability coverage', () => {
6567 if ( u . includes ( 'router.huggingface.co/hf-inference/models/' ) ) {
6668 return jsonResponse ( { generated_text : 'huggingface ok' } ) ;
6769 }
70+ if ( u === 'https://api.cohere.com/v2/chat' ) {
71+ return jsonResponse ( { message : { content : [ { text : 'cohere ok' } ] } } ) ;
72+ }
6873 return jsonResponse ( { message : `unexpected ${ u } ` } , 404 ) ;
6974 } ) ;
7075 global . fetch = fetchMock ;
@@ -75,7 +80,8 @@ describe('provider availability coverage', () => {
7580 { provider : 'openai' , model : 'gpt-4o-mini' , expected : 'openai ok' } ,
7681 { provider : 'openrouter' , model : 'openai/gpt-4o-mini' , expected : 'openrouter ok' } ,
7782 { provider : 'cloudflare' , model : '@cf/meta/llama-3.1-8b-instruct' , expected : 'cloudflare ok' } ,
78- { provider : 'huggingface' , model : 'mistralai/Mistral-7B-Instruct-v0.2' , expected : 'huggingface ok' }
83+ { provider : 'huggingface' , model : 'mistralai/Mistral-7B-Instruct-v0.2' , expected : 'huggingface ok' } ,
84+ { provider : 'cohere' , model : 'command-r-plus' , expected : 'cohere ok' }
7985 ] ;
8086
8187 for ( const row of rows ) {
0 commit comments